package q34;
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);
}
}
// Result:
// D A D
upvoted 4 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Tojose
Highly Voted 1 year agoSrinivasJasti
Most Recent 2 weeks, 1 day agomanjulata
6 months, 1 week agoxplorerpj
6 months, 3 weeks agojames2033
10 months, 4 weeks ago