Q.– Given the code fragment:
public static void main(String[] args) {
String str = "";
str.trim();
System.out.println(str.equals(" ") + " “ + str.isEmpty());
}
What is the result?
A) true false
B) false true
C) true true
D) false false
⧪ please give your answer in a comment section.
public static void main(String[] args) {
String str = "";
str.trim();
System.out.println(str.equals(" ") + " “ + str.isEmpty());
}
What is the result?
A) true false
B) false true
C) true true
D) false false
⧪ please give your answer in a comment section.
2 Comments
Option D
ReplyDeleteb
ReplyDelete