A

Admin • 828.03K Points
Coach

Q. Determine output:

Code:
public class Test {
static void test(float x){
System.out.print("float");
}

static void test(double x){
System.out.print("double");
}

public static void main(String[] args){
test(99.9);
}
}
  • (A) float
  • (B) double
  • (C) Compilation Error
  • (D) Exception is thrown at runtime
  • Correct Answer - Option(B)
  • Views: 9
  • Filed under category Java
  • Hashtags:

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.