java is string in array of strings code example
Example 1: string array in java methods
String[] vowels = { "a", "e", "i", "o", "u" };
System.out.println(vowels);
System.out.println(Arrays.toString(vowels));
Example 2: an array of names for java
String[] names = {
"Liam",
"Olivia",
"Noah",
"Emma",
"Oliver",
"Ava",
"William",
"Sophia",
"Elijah",
"Isabella",
"James",
"Charlotte",
"Benjamin",
"Amelia",
"Lucas",
"Mia",
"Mason",
"Harper",
"Ethan",
"Evelyn"
};