Local variables are those which are declared within a block of code like methods. Local variables should be initialized before accessing them, whereas
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.
Liked By
Write Answer
What are local and instance variables in Java ?
Join MindStick Community
You have need login or register for voting of answers or question.
Devesh Kumar Singh
24-Nov-2015Local variables are those which are declared within a block of code like methods. Local variables should be initialized before accessing them, whereas
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.