how to declare values in array in java code example
Example 1: java create array with values
//Given values must match array type
int[] myIntArray = {1, 2, 3};
Example 2: declare array with values java
int[] myIntArray = new int[3];
int[] myIntArray = {1, 2, 3};
int[] myIntArray = new int[]{1, 2, 3};