No student devices needed. Know more
15 questions
What does the name Polymorphism translate to?
Many forms
Many changes
two forms
liquid forms
What are the two types of Polymorphism?
Syntax and runtime
Constructor and method
derive and base
encapsulation and Inheritance
Polymorphism is features of object oriented programming?
True
False
What will be the output of this program?
drawing...
drawing rectangle...
drawing circle...
drawing triangle...
Is the code above an example of overloading or overriding a method?
Overloading
Overriding
In the code above, If I write the following statement will it execute successfully.
Rectangle rec= new Triangle();
Yes, there is nothing wrong with this method of polymorphism.
No, Rectangle and Triangle are subclasses of Shape and cannot cast to each other.
The "is a" relationship between super class and sub class is commonly referred as:
Overriding
Inheritance
Constructor
Friends
Sub class can override the function of super class.
TRUE
FALSE
Multiple inheritance occurs when a class derives from one or more super classes.
FALSE
TRUE
Which among the following best describes polymorphism?
It is the ability for a message/data to be processed in more than one form
It is the ability for a message/data to be processed in only 1 form
It is the ability for many messages/data to be processed in one way
It is the ability for undefined message/data to be processed in at least one way
When does method overloading is determined?
At run time
At compile time
At coding time
At execution time
Did the code can be executed?
Yes
No
From Super Class
From Sub Class
Which inheritance in java programming is not supported
Single inheritance
Multilevel inheritance
Multiple inheritance using classes
Multiple inheritance using interfaces
Explore all questions with a free account