java interview question and answer what is local variable and instance variable

1,406 views · Published 22 September 2012 · 2:15 · Indexed 27 October 2026

Channel: Interview DOT · 2012 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. http://www.interviewdot.com

Welcome to www.InterviewDot.com     How to prepare for Java interview Questions :    

Top 20 Java Interview Questions and Answers :

What is difference between "local variable" and "instance variable" ?

What are local variables?

Local variables are those which are declared within a block of code like methods. 

Local variables should be initialized before accessing them.

What are instance variables?

Instance variables are those which are defined at the class level. 

Instance variables need not be initialized before using them as they are automatically initialized to their default values.



For more Java Interview questions and answers  - logon to www.InterviewDot.com - India's Top Interview Guide.

More from this channel