Computer Applications
Given below are the two method definitions:
- public static double Check(double x, double y)
- public static double Check(int x, double y)
Which of the two methods is invoked for the following?
- double z = Check (6, 5);
- double z = Check (5.5, 7.4);
User Defined Methods
18 Likes
Answer
- double z = Check (6, 5); invokes public static double Check(int x, double y)
- double z = Check (5.5, 7.4); invokes public static double Check(double x, double y)
Answered By
10 Likes
Related Questions
When a method has been declared more than once in a class, how does Java determine the overloading?
What is an ambiguous invocation? Give an example.
What is the signature of the following method heading?
public void CoolMethod(int xx, char yy, int zz)
Which OOP principle implements function (method) overloading?