Initialize string array using curly braces {}
public class Main { public static void main(String[] args) { String[] strArr = {"strA", "strB", "strC"}; for (String str: strArr) { System.out.println(str); } } }
strA strB strC
public class Main { public static void main(String[] args) { String[] strArr = {"strA", "strB", "strC"}; for (String str: strArr) { System.out.println(str); } } }
strA strB strC