nerdexam
Oracle

1Z0-808 · Question #4

1Z0-808 Question #4: Real Exam Question with Answer & Explanation

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

Working with Methods and Encapsulation

Question

class X { static int i; int j; public static void main(String[] args) { X x1 = new X(); X x2 = new X(); x1.i = 3; x1.j = 4; x2.i = 5; x2.j = 6; System.out.println( "x1.i = " + x1.i + " " + "x1.j = " + x1.j + " " + "x2.i = " + x2.i + " " + "x2.j);" ); } } What is the result?

Options

  • A3 4 5 6
  • B3 4 3 6
  • C5 4 5 6
  • D3 6 4 6

Unlock 1Z0-808 to see the answer

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

Topics

#static variables#instance variables#variable scope#object creation
Full 1Z0-808 Practice