Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
public void print() {}
public static void print() {}
public final void print() {}
None of the above
Method overloading
Method overriding
Operator overloading
Animal animal = new Dog();
Dog dog = new Animal();
Animal animal = new Animal();
Dog dog = (Dog) animal;
super
this
override
Code reuse
Flexibility
Encapsulation
Simplicity
final
extends
Method Overloading
Method Overriding
Both A and B
Dog d = new Dog(); Animal a = d; Dog d2 = (Dog) a;
Animal a = new Animal(); Dog d = (Dog) a;
Dog d = new Animal(); Animal a = d;
The method name must be the same but the parameter list must be different.
The method name and parameter list must be the same but the return type can be different.
The method name and parameter list must be the same but the access modifiers can be different.