134k views
15 votes
How to create an array of strings?

User NSN
by
5.1k points

1 Answer

8 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 Noushad
by
5.3k points