I'm new to Java and I know this is a dumb question, but I can't understand the way how Java is initializing his variables. I tried to do some test, but I can't figure out how does this is working.
When I was learning programming C or Java, the syntax of defining a new variable was like this:
type name;
int value;
and an array of integers:
type name[];
int values[];
In Java int[] val;
this would be an array in array?
Ex:
int[] val = new int[2];
val[0] = 012345; // Error ?
The ex above is correct. So that means the following example is the same?
int val[] = new int[2];
val[0] = 123;
val[1] = 456;
int[] val2 = new int[2];
val2[0] = 789;
val2[0] = 101;