A

Admin • 830.13K Points
Coach

Q. What is the output?
String s = "hello";
System.out.println(s.length());

  • (A) 4
  • (B) 5
  • (C) 6
  • (D) 0

Explanation by: Admin
The string "hello" has 5 characters, so s.length() returns 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.