- A names
- B null
- C Compilation fails
- D An exception is thrown at runtime
- Share this MCQ
Answer:
B
Share this MCQ
The names array is initialized with five null elements. Then elements 0 and 1 are assigned the String values "a" and "b" respectively (the command-line arguments passed to main). Elements of names array 2, 3, and 4 remain unassigned, so they have a value of null.
Click me to Read more Question & Answer of Java Language FundamentalShare this MCQ