nerdexam
Oracle

1Z0-851 · Question #109

1Z0-851 Question #109: Real Exam Question with Answer & Explanation

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

Question

Given: 01. public class Boxer1{ 02. Integer i; 03. int x; 04. public Boxer1(int y) { 05. x = i+y; 06. System.out.println(x); 07. } 08. public static void main(String[] args) { 09. new Boxer1(new Integer(4)); 10. } 11. } What is the result?

Options

  • AThe value "4" is printed at the command line.
  • BCompilation fails because of an error in line 5.
  • CCompilation fails because of an error in line 9.
  • DA NullPointerException occurs at runtime.
  • EA NumberFormatException occurs at runtime.
  • FAn IllegalStateException occurs 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.

Full 1Z0-851 Practice