Oracle
1Z0-851 · Question #63
1Z0-851 Question #63: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #63. The question stem and answer options stay visible for context.
Question
Given: 1. public class KungFu { 2. public static void main(String[] args) { 3. Integer x = 400; 4. Integer y = x; 5. x++; 6. StringBuilder sb1 = new StringBuilder("123"); 7. StringBuilder sb2 = sb1; 8. sb1.append("5"); 9. System.out.println((x == y) + " " + (sb1 == sb2)); 10. } 11.} What is the result?
Options
- Atrue true
- Bfalse true
- Ctrue false
- Dfalse false
- ECompilation fails.
- FAn exception is thrown at runtime.
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.