Multiple choice

How do you declare an array of ten Strings?

  1. String[] running = new String[10];

  2. String[] running = String[10];

  3. String[10] running = new String[];

  4. String running = String[10];

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To declare and instantiate an array of ten Strings in Java, you use the syntax 'String[] running = new String[10];'. This correctly specifies the array type, variable name, and allocates space for 10 String references.