A

Admin • 825.56K Points
Coach

Q. What will this print?
String[] names = new String[2];
names[1] = "John";
System.out.println(names[0]);

  • (A) John
  • (B) null
  • (C) undefined
  • (D) 0

Explanation by: Admin
names[0] was not initialized, so it remains null.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.