A

Admin • 802.91K Points
Coach

Q. What will this print?
String s = "Java";
System.out.println(s.charAt(2));

  • (A) J
  • (B) a
  • (C) v
  • (D) A

Explanation by: Admin
s.charAt(2) returns the character at index 2, which is 'v'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.