nerdexam
Oracle

1Z0-850 · Question #35

1Z0-850 Question #35: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-850 to reveal the answer and full explanation for question #35. The question stem and answer options stay visible for context.

Question

Given:
  1. class Example {
  2. int x = 50;
  3. int y = 100;
  4. public static void main(String args[]) {
  5. int x = 0, y = 10;
  6. Example ex = new Example();
  7. while (x < 3) {
  8. x++; y--;
  9. }
  10. System.out.println("x = " + x + ", y = " + y);
  11. }
  12. } What is the result?

Options

  • ACompilation fails because of an error at line 8.
  • Bx=3, y=7
  • CCompilation fails because of an error at line 11.
  • DCompilation fails because of an error at line 9.
  • Ex=53, y=87
  • FCompilation fails because of an error at line 10.

Unlock 1Z0-850 to see the answer

You've previewed enough free 1Z0-850 questions. Unlock 1Z0-850 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.

Full 1Z0-850 Practice
Given: 1. class Example { 2. int x = 50; 3. int y = 100; 4. public... | 1Z0-850 Q#35 Answer | NerdExam