No problem. Keep in mind that had you done this instead:
int [] a; //no declaration!
System.out.println(java.util.Arrays.toString(a));
...you would have received a similar error.
Type: Posts; User: KevinWorkman
No problem. Keep in mind that had you done this instead:
int [] a; //no declaration!
System.out.println(java.util.Arrays.toString(a));
...you would have received a similar error.
That's just the default value populated in an array- 0 for ints, null for Objects. It's similar to how class variables (not method variables) get a default value, even if you don't explicitly give...