Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 1z0-808 topic 1 question 172 discussion

Actual exam question from Oracle's 1z0-808
Question #: 172
Topic #: 1
[All 1z0-808 Questions]

Given:

What is the result?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Geradine
2 weeks, 4 days ago
С public class SumTest { 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); // Integer sum is 30 doSum(10.0, 20.0); // Double sum is 30.0 doSum(10.0f, 20.0f); // Float sum is 30.0 } }
upvoted 1 times
...
iSnover
1 year, 7 months ago
The correct answer is the letter A, there is an overload of the methods. Here's the code: public class Test { 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); } }
upvoted 3 times
yanoolthecool
5 months ago
Answer is actually C Integer sum is 30 double sum is 30.0
upvoted 1 times
...
...
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.

SaveCancel
Loading ...