java declare array with all 1 code example
Example 1: java how to initialize an array
int[] arr = new int[10]; //Can hold 10 elements
Example 2: 1 elemenet array java
String[] arr = {"I am the one and only"};
int[] arr = new int[10]; //Can hold 10 elements
String[] arr = {"I am the one and only"};