java initialize array with numbers code example
Example 1: initialize an array in java
int[] array=new int[5];
int[] array2=new int[]{1,2};
Example 2: java initialize int array
int[] arr = new int[n];
int[] array=new int[5];
int[] array2=new int[]{1,2};
int[] arr = new int[n];