P

Priyanka Tomar • 35.28K Points
Coach

Q. What is output of the program?
class Test{
public void display(int x, double y){
System.out.println(x+y);
}
public double display(int p, double q){
return (p+q);
}
public static void main(String args[]){
Test test = new Test();
test.display(4, 5.0);
System.out.println(test.display(4, 5.0));
}
}

  • (A) 9.0 9.0
  • (B) 9 9
  • (C) Compilation Error
  • (D) None of these
  • Correct Answer - Option(C)
  • Views: 42
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics