Question 51 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 51 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given:

public class SumTest {

public static void dosum(Integer x, Integer y) (
System.out.println ("Integer sum is "+ (x + y))i
}

public static void doSum(double x, double y) {
System.out.println ("double sum is "+ (x + y))3
i

public static void dosum(float x, float y) {
System.out.println("float sum is "+ (x + y))i
}

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);

What is the result?

c A) int sum is 30
float sum is 30.0

© B) int sum is 30
double sum is 30

© C) Integer sum is 30
double sum is 30.0

© D) Integer sum is 30
float sum is 30.0

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.