Java SE 8 Programmer 1Z0–808 Practice Full Test 1
© examsiri.com
Question : 3 of 84
Marks:
+1,
-0
Given the code fragment:
What is the result ?
public static void main(String[] args) {
StringBuilder sb = new StringBuilder(5);
String s = "";
if (sb.equals(s)) {
System.out.println("Match 1");
} else if (sb.toString().equals(s.toString())) {
System.out.println("Match 2 ");
} else {
System.out.println("No Match");
}
} What is the result ?
Go to Question: