initialize int array and value java code example
Example 1: initialize array with values java
int[] arr = {3,6,9,12};
int[] arr = new int[]{1, 2, 3};
Example 2: initialize an array in java
int[] array=new int[5];
int[] array2=new int[]{1,2};
int[] arr = {3,6,9,12};
int[] arr = new int[]{1, 2, 3};
int[] array=new int[5];
int[] array2=new int[]{1,2};