java initiate array with values code example
Example 1: initialize array with values java
int[] arr = {3,6,9,12};
int[] arr = new int[]{1, 2, 3};
Example 2: java initialize int array
int[] arr = new int[n];
int[] arr = {3,6,9,12};
int[] arr = new int[]{1, 2, 3};
int[] arr = new int[n];