Show List
Quiz - Java classes, objects, inheritance and polymorphism - 1
Select the right answer for below questions:
What is a class in Java?
A collection of variables
A collection of methods
A blueprint for creating objects
All of the above
A blueprint for creating objects
What is an object in Java?
A blueprint for creating objects
A collection of variables
A collection of methods
An instance of a class
An instance of a class
What is inheritance in Java?
A mechanism of creating new classes
A mechanism of creating objects
A mechanism of acquiring the properties and behaviors of an existing class
None of the above
A mechanism of acquiring the properties and behaviors of an existing class
What is polymorphism in Java?
The ability of a class to have multiple methods with the same name
The ability of an object to take on many forms
The ability of a class to inherit from multiple classes
None of the above
The ability of an object to take on many forms
What is the use of the super keyword in Java?
To access the methods of the parent class
To access the methods of the child class
To access the methods of the current class
None of the above
To access the methods of the parent class
What is the use of the abstract keyword in Java?
To declare an abstract method
To declare a concrete class
To declare an abstract class
None of the above
To declare an abstract class
What is the use of the final keyword in Java?
To declare a final class
To declare a final method
To declare a final variable
All of the above
All of the above
What is the use of the this keyword in Java?
To refer to the parent instance of the class
To refer to the child instance of the class
To refer to the current instance of the class
None of the above
To refer to the current instance of the class
What is the use of method overriding in Java?
To provide a general implementation of a method in the parent class
To provide a specific implementation of a method in the child class
To provide a specific implementation of a method in the parent class
None of the above
To provide a specific implementation of a method in the child class
What is the use of method overloading in Java?
To provide a specific implementation of a method in the child class
To provide a specific implementation of a method in the parent class
To provide multiple implementations of a method with different arguments
None of the above
To provide multiple implementations of a method with different arguments
Submit
Retry
{"qz1-528383":"A blueprint for creating objects","qz1-528384":"An instance of a class","qz1-528385":"A mechanism of acquiring the properties and behaviors of an existing class","qz1-528386":"The ability of an object to take on many forms","qz1-528387":"To access the methods of the parent class","qz1-528388":"To declare an abstract class","qz1-528389":"All of the above","qz1-528390":"To refer to the current instance of the class","qz1-528391":"To provide a specific implementation of a method in the child class","qz1-528392":"To provide multiple implementations of a method with different arguments"}
Leave a Comment