Page 1
Java: Object-Oriented Programming
Latest Questions and Correct Answers
Inheritance is a mechanism in which one class can inherit the
______ of another "parent" class
Ans: fields and methods
In Java, a class can ______ up to one other class to inherit
from it
Ans: extend
Can a class extend multiple classes?
Ans: no a class can only extend 1 other class
An ______ does not have a body
Ans: abstract method
An abstract method only has a ______
Ans: method signature
______ cannot be instantiated
Ans: interfaces and abstract classes
, Page 2
Interfaces can be ______ by classes or abstract classes
Ans: implemented
Interfaces can be ______ by other interfaces
Ans: extended
The keyword used to inherit an Interface is...
Ans: implements
The keyword used to inherit a class or abstract class is
________
Ans: extends
______ is when a subclass redefines a method of it's parent
class
Ans: Overriding
______ are not inherited
Ans: private and static members
To call the constructor of a parent class, you must use the
______ keyword
Ans: super
Java: Object-Oriented Programming
Latest Questions and Correct Answers
Inheritance is a mechanism in which one class can inherit the
______ of another "parent" class
Ans: fields and methods
In Java, a class can ______ up to one other class to inherit
from it
Ans: extend
Can a class extend multiple classes?
Ans: no a class can only extend 1 other class
An ______ does not have a body
Ans: abstract method
An abstract method only has a ______
Ans: method signature
______ cannot be instantiated
Ans: interfaces and abstract classes
, Page 2
Interfaces can be ______ by classes or abstract classes
Ans: implemented
Interfaces can be ______ by other interfaces
Ans: extended
The keyword used to inherit an Interface is...
Ans: implements
The keyword used to inherit a class or abstract class is
________
Ans: extends
______ is when a subclass redefines a method of it's parent
class
Ans: Overriding
______ are not inherited
Ans: private and static members
To call the constructor of a parent class, you must use the
______ keyword
Ans: super