Oracle
1Z0-851 · Question #83
1Z0-851 Question #83: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #83. The question stem and answer options stay visible for context.
Question
Given: 1. interface DeclareStuff { 2. public static final int EASY = 3; 3. 4. void doStuff(int t); 5. } 6. 7. public class TestDeclare implements DeclareStuff { 8. public static void main(String[] args) { 9. int x = 5; 10. new TestDeclare().doStuff(++x); 11. } 12. 13. void doStuff(int s) { 14. s += EASY + ++s; 15. System.out.println("s " + s); 16. } 17.} What is the result?
Options
- As 14
- Bs 16
- Cs 10
- DCompilation fails.
- EAn 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.