209,292 views
4 votes
4 votes
How to create an array of strings?

User Abhishake
by
2.7k points

1 Answer

16 votes
16 votes

Answer:

The String Array is initialized at the same time as it is declared. You can also initialize the String Array as follows: String[] strArray = new String[3]; strArray[0] = “one”; strArray[1] = “two”; strArray[2] = “three”; Here the String Array is declared first.

Step-by-step explanation:

User Gojomo
by
2.5k points