Which is the correct way to declare and initialize an int array of size 10 in Java? code example
Example 1: array declaration and initialization in java
int[] age = new int[5];
Example 2: set array length java
int[] num = new int[5];
int[] age = new int[5];
int[] num = new int[5];