✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
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?