java initialise array with length code example
Example 1: java new string array
String[] myStringArray = new String[3];
String[] myStringArray = {"a", "b", "c"};
String[] myStringArray = new String[]{"a", "b", "c"};
Example 2: java how to initialize an array
int[] arr = new int[10]; //Can hold 10 elements
Example 3: 1 elemenet array java
String[] arr = {"I am the one and only"};