Multiple Choice Question

Quiz Guidelines

 

QID: 
125
Question: 

Consider the following class.

class TestClass{
void probe(Object x) { System.out.println("In Object"); } //3 
void probe(Number x) { System.out.println("In Number"); } //2 
void probe(Integer x) { System.out.println("In Integer"); } //2 
void probe(Long x) { System.out.println("In Long"); } //4
public static void main(String[] args){ double a = 10;
new TestClass().probe(a);
}
}

What will be printed?

Select 1 option

A. In Number
B. In Object
C. In Long
D. In Integer
E. It will not compile.

Q&A Set: