Correct is B.
public class App {
public static void doSum(Integer x, Integer y) {
System.out.println("Integer sum is " + (x + y));
}
public static void doSum(double x, double y) {
System.out.println("double sum is " + (x + y));
}
public static void doSum(float x, float y) {
System.out.println("float sum is " + (x + y));
}
public static void main(String[] args) {
doSum(10, 20);
doSum(10.0, 20.0);
}
}
The answer is the letter B, a method overload occurs printing what is written in that answer.
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
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.
MPignaProTech
8 months agoSisar
10 months agoGeradine
1 year, 1 month agohajime123
1 year, 2 months agoManuTov
1 year, 8 months agoiSnover
2 years, 8 months ago