What do you mean by Local variable and Instance variable?

  Local Variables Instance Variables
1. Declared in constructor, method or block. Declared in a class
2. Not possible to use access modifiers Access modifiers can be given
3. Visible within the declared method Visible for all methods
4. No default value Have default values

Suggest An Answer

No suggestions avaliable!

Latest post from Java interview questions

Ask Question