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