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
Yes, when you initialise an array the contents will be set to the default value for that type, for int it would be 0 and for a reference type it would be null.
If you initialise an array and inspect the contents you can see this for yourself:
...
final int[] in = new int[5];
for (int i = 0; i < in.length; i++) {
System.out.println(in[i]);
}
...
This will print:
0
0
0
0
0