A

Admin • 828.03K Points
Coach

Q. What will this code output?
String str = "";
System.out.println(str.isEmpty());

  • (A) true
  • (B) false
  • (C) Compile error
  • (D) null

Explanation by: Admin
isEmpty() returns true if the string has length 0.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.