Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

I.

ENUMERATION

1-3.Give the 3 final keyword in Java

4-7. What are the four types of association between the objects

8-10.Give atleast 3 concepts in Object-Oriented Programming

II.Multiple Choice

1. Defined as an instance of a class.


A.Object
B.Inheritance
C.Class

2. Refers to the knowledge or information or dependency of another class.

A. Encapsulation

B. Coupling

C. Polymorphism

3. Is a mechanism in which one object acquires all the properties and behaviors of a parent object.

A. Composition

B. Inheritance in Java

C. Reusability

4.What do you call when a class inherits another class?

A. single inheritance

B. Multilevel Inheritance

C. Hierarchical Inheritance

5. What do you call when there is a chain of inheritance?

A. single inheritance

B. Multilevel Inheritance

C. Hierarchical Inheritance

III.TRUE OR FALSE

1. The super keyword in Java is a reference variable which is used to refer immediate parent
class object.
2. If subclass (child class) has the same method as declared in the parent class, it is known as
Aggregation in Java.
3. The relationship between the two classes is Programmer IS-A Employee.
4. Method overriding is used to provide the specific implementation of a method which is
already provided by its superclass.
5. The Java final variable in java is used to restrict the user.
6. If you make any method as final, you cannot override it.
7. The super keyword can also be used to invoke the parent class constructor.
8. There can be three types of inheritance in java: single, multilevel and hierarchical.
9. Aggregation represents the relationship where one object contains other objects as a part of
its state.
10. Any entity that has state and behavior is known as an object. For example, a chair, pen,
table, keyboard, bike, etc.

You might also like