Answers for "Local Variable and Instance Variable?"

0

Local Variable and Instance Variable?

First is declaration. Local variable has to be in the block. 
it can be static block or main method block. 
If it is declared in the class not in the block, 
then it is Instance variable. 
Instance variable has a default value is ZERO. 
Local variable if is not initialized there is no default 
value for local variable Instance variable must be called 
through the object into the main method. Instance variable belongs to object
Local variable must be initialized to use but 
Instance variable can get the 0 value or null
Posted by: Guest on May-28-2021

Code answers related to "Local Variable and Instance Variable?"

Browse Popular Code Answers by Language