Q) Exposing only necessary information to clients ( main programs, classes) is known as
- Abstraction
- Encapsulation
- Data hiding
- Hiding complexity
Answer: 1
Q) Hiding the complexity in program is known as
- Abstraction
- Encapsulation
- Data hiding
- Composition
Answer: 2
Q) For Cat and Animal class, correct way of inheritance in java is
- class Cat extends Animal
- class Animal extends Cat
- Both are correct way
- None is correct way
Answer: 1
Q) In a class, encapsulating an object of another class is called
- Composition
- Inheritance
- Encapsulation
- None
Answer: 1
Q) IS-A relationship in java is related to
- Inheritance
- Encapsulation
- Composition
- None
Answer: 1