I have here a simple question related to Java. Let\'s say you have an int array as instance variable:
int[] in = new int[5];
So, now by def
It is the same thing if you do :
int[] in = new int[5] as instance variable or local variable. The array object in will contain zeros in both cases.
Difference would be if you would do something like :
Instance variable : int[] in; (it is initialized with null), and the in object will live in heap space.
Local variable : int[] in; (it has to be initialized by the user) will live in stack