nerdexam
Oracle

1Z0-829 · Question #23

1Z0-829 Question #23: Real Exam Question with Answer & Explanation

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

Java Object-Oriented Approach

Question

Given: public class Test { public void sum(int a, int b) { System.out.print("A"); } public void sum(int a, float b) { System.out.print("B"); } public void sum(float a, float b) { System.out.print("C"); } public void sum(double... a) { System.out.print("D"); } public static void main(String[] args) { Test t = new Test(); t.sum(10,15.25); t.sum(10, 24); t.sum(10.25,10.25); } } What is the result?

Options

  • AB A C
  • BD A D
  • CB A D
  • DD D D

Unlock 1Z0-829 to see the answer

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

#Method Overloading#Type Promotion#Varargs#Type Matching
Full 1Z0-829 Practice