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.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
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.