Home » Oracle » 1z0-803 » What is the result?
Given:
What is the result?
A. One
B. Two
C. Three
D. Compilation fails
Correct Answer: C
Explanation/Reference:
Explanation:
In this scenario the overloading method is called with a double/float value, 4.0. This makes the third overload method to run.
Note:
The Java programming language supports overloading methods, and Java can distinguish between methods with different method signatures. This means that methods within a class can have the same name if they have different parameter lists. Overloaded methods are differentiated by the number and the type of the arguments passed into the method.
Download Printable PDF. VALID exam to help you PASS.
|
|