Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
Animal animal = new Dog();
Dog dog = new Animal();
Animal animal = new Animal();
Dog dog = (Dog) animal;
Polymorphism and inheritance are two different concepts in Java
Polymorphism and inheritance are closely related concepts in Java
Polymorphism is a subtype of inheritance in Java
None of the above
Method Overloading
Method Overriding
Both A and B
Dog
Animal
Mammal
super
this
override
Static methods can be overridden in Java
Static methods can be overloaded in Java
Static methods can participate in polymorphism in Java
Dog d = new Dog(); Animal a = d;
Animal a = new Animal(); Dog d = (Dog) a;
Dog d = new Animal();
What is polymorphism in Java?
It is the ability of an object to take on many forms
It is the ability to define multiple methods with the same name but different signatures
It is the ability of an object to hide its implementation details
Compile-time Polymorphism
Run-time Polymorphism
Inheritance Polymorphism