nerdexam
Oracle

1Z0-819 · Question #162

1Z0-819 Question #162: Real Exam Question with Answer & Explanation

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

Question

What is the result of compiling and running the following code? public class Overload { static void print(int..., a2) { System.out.print("int...."); } static void print(long a, long b) { System.out.print("long...."); } static void print(Integer a1, Integer a2) { System.out.print("Integer, Integer"); } public static void main(String[] args) { int a = 1; long b = 1L; print(a, b); } }

Options

  • ADoes not compile
  • BPrints int
  • CPrints long, long
  • DPrints Integer, Integer
  • EThrows an exception
  • FNone of these

Unlock 1Z0-819 to see the answer

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