exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 96 discussion

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

Given:

What is the result?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: D

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
iSnover
Highly Voted 2 years, 3 months ago
Answer is B, i tested. Trie it: public class Main { 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 doSum(int x, int y) { System.out.println("Int sum is " + (x + y)); } public static void main(String[] args) { doSum(10, 20); doSum(10.0, 20.0); }
upvoted 10 times
...
MPignaProTech
Most Recent 3 months ago
correrct answer is B
upvoted 1 times
...
fvelazqueznava
1 year, 3 months ago
B is the correct
upvoted 1 times
...
somrita90
1 year, 4 months ago
Answer B is correct, while passing 10, 20 its auto promoting to int primitive and while passing 10.0 , 20.0 its auto promoting to double
upvoted 4 times
...
IbrahimAlnutayfi
1 year, 6 months ago
The answer is B
upvoted 1 times
...
Vicky_65
1 year, 9 months ago
B is correct
upvoted 1 times
...
carloswork
2 years, 2 months ago
Answer is B.
upvoted 2 times
...
kkaayyyy
2 years, 3 months ago
Output is : int sum is 30 double sum is 30.0
upvoted 2 times
...
praroopgupta
2 years, 3 months ago
Correct answer should be B as overloaded methods have int and double argument types
upvoted 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago