Oracle 1Z0-808 Exam question no. 58

Q.- Given:-

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); 
                doSum (10.0, 20.0); 
         }
}

What is the result? 

A) Integer sum is 30 
     float sum is 30.0 

B) Integer sum is 30 
    double sum is 30.0 

C) float sum is 30.0 
    double sum is 30.0 

D) double sum is 30.0 
     float sum is 30.0 


⧪ please give your answer in a comment section.

Post a Comment

4 Comments