CMSC Exam
Verified Exam Questions and Answers Latest update 2026/2027
Question:
1. Inheritance is the process by which one new class,
called the class
Answer:
derived
Question:
2. Derived class is created from another class, called the base
class
Answer:
Question:
3. The derived class is also called: or class
Answer:
subclass, child
Question:
4. The base class is also called:
Answer:
superclass or parent class
Question:
5. Derived Class should have all the and
Base Class has.
Answer:
that Methods and instance
variables
Question:
6. Derived Class can define new instance variables and
new methods
Answer:
True
,Question:
7. Extends Syntax
Answer:
public class derivedClass
extends baseClass { ... }
Question:
8. Derived Class Base Class
Answer:
is a
Question:
9. When initializing a new Student object, we need to
initialize its
Answer:
base class
Question:
10. SubClass objects inherit all the private data
Answer:
True
Question:
11. Private members of the base class cannot be accessed True
directly
Answer:
Question:
12. When a class element (instance variable or method) derived
is declared to be protected (rather than public or pri- package
vate) it is accessible:
To any class (and hence to all descendents), and
To any class in the same
Answer:
, Question:
13. Package: When a class element is not given any
(private, public, protected) it is said to have pack- package
age access.
Answer:
access modifier
Question:
It is accessible: To any class in the same
Answer:
Question:
14. When should a person use public?
Answer:
public interface
Question:
Methods of the object's
instance variables (static final)
Answer:
Constant
Question:
15. When should a person use private?
Answer:
Instance variables
Question:
(other than constants)
Internal (not intended for use except in this
class)
Answer:
helper/utility methods
Question:
16. Protected/Package:
methods (for use in this class and related class-
es)
Verified Exam Questions and Answers Latest update 2026/2027
Question:
1. Inheritance is the process by which one new class,
called the class
Answer:
derived
Question:
2. Derived class is created from another class, called the base
class
Answer:
Question:
3. The derived class is also called: or class
Answer:
subclass, child
Question:
4. The base class is also called:
Answer:
superclass or parent class
Question:
5. Derived Class should have all the and
Base Class has.
Answer:
that Methods and instance
variables
Question:
6. Derived Class can define new instance variables and
new methods
Answer:
True
,Question:
7. Extends Syntax
Answer:
public class derivedClass
extends baseClass { ... }
Question:
8. Derived Class Base Class
Answer:
is a
Question:
9. When initializing a new Student object, we need to
initialize its
Answer:
base class
Question:
10. SubClass objects inherit all the private data
Answer:
True
Question:
11. Private members of the base class cannot be accessed True
directly
Answer:
Question:
12. When a class element (instance variable or method) derived
is declared to be protected (rather than public or pri- package
vate) it is accessible:
To any class (and hence to all descendents), and
To any class in the same
Answer:
, Question:
13. Package: When a class element is not given any
(private, public, protected) it is said to have pack- package
age access.
Answer:
access modifier
Question:
It is accessible: To any class in the same
Answer:
Question:
14. When should a person use public?
Answer:
public interface
Question:
Methods of the object's
instance variables (static final)
Answer:
Constant
Question:
15. When should a person use private?
Answer:
Instance variables
Question:
(other than constants)
Internal (not intended for use except in this
class)
Answer:
helper/utility methods
Question:
16. Protected/Package:
methods (for use in this class and related class-
es)