✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Given the following code :
class PolymorphismExample {
void display(int a) {
System.out.println("Method with int parameter: " + a);
}
void display(String a) {
System.out.println("Method with String parameter: " + a);
}
public static void main(String[] args) {
PolymorphismExample obj = new PolymorphismExample();
obj.display("10 is an integer");
}
}
What is the output of the following code?