- Home
- Chapter 1 - Object Oriented Programming Concepts
- Object Oriented Programming Concepts
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 2 - Introduction to Java
- Introduction to Java
- Multiple Choice Questions
- Assignment Questions
- Chapter 3 - Values and Data Types
- Values and Data Types
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 4 - Operators in Java
- Operators in Java
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 5 - User-Defined Methods
- User-Defined Methods
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 6 - Input in Java
- Input in Java
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 7 - Mathematical Library Methods
- Mathematical Library Methods
- Multiple Choice Questions
- Assignment Questions
- Chapter 8 - Conditional Constructs in Java
- Conditional Constructs in Java
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 9 - Iterative Constructs in Java
- Iterative Constructs in Java
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions and Programs
- Chapter 10 - Nested for loops
- Nested for loops
- Assignment Questions and Programs
- Chapter 11 - Constructors
- Constructors
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 12 - Library Classes
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 13 - Encapsulation and Inheritance
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 14 - Arrays
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 15 - String Handling
- Library Classes
- Multiple Choice Questions
- Assignment Questions
Encapsulation and Inheritance in Java
Chapter 13
Encapsulation and Inheritance in Java
Class 10 - Logix Kips ICSE Computer Applications with BlueJ
![]() Share with a Friend |
Multiple Choice Questions
Question 1
............... is the technique of binding both data and methods together to keep them safe from unauthorised access and misuse.
- Abstraction
- Inheritance
- Encapsulation
- Polymorphism
Answer
Encapsulation
Reason — Encapsulation is the technique of binding both data and methods together to keep them safe from unauthorised access and misuse.
Question 2
Which of the following is an access specifier?
- public
- protected
- private
- All of these
Answer
All of these
Reason — Public, private and protected are access specifiers.
Question 3
A member variable declared with a public access specifier has visibility in ............... .
- Class
- Package
- Subclass
- All of these
Answer
All of these
Reason — A member variable declared with a public access specifier has visibility in the class, its sub classes and the package as well.
Question 4
A member variable declared with a private access specifier has visibility only in the ............... .
- Class
- Package
- Subclass
- All of these
Answer
Class
Reason — A member variable declared with a private access specifier has visibility only in the class in which it is declared.
Question 5
A member variable declared with no access specifier has visibility in ............... .
- Class and package only
- Class, package and subclass only
- Class and subclass only
- Class only
Answer
Class and package only
Reason — A member variable declared with no access specifier has visibility in the same class and other classes of the same package only.
Question 6
An instance variable ............... .
- needs an instance to access it
- does not need an instance to access it
- can be accessed using the class name
- is declared with the static keyword
Answer
needs an instance to access it
Reason — An instance variable needs an instance (object) to access it as each instance of the class has a separate copy of the instance variable.
Question 7
A static variable ............... .
- is preceded by static keyword in the declaration
- is accessed via the class name
- is also known as a class variable
- All of the above
Answer
All of the above
Reason — A static variable is preceded by static keyword in the declaration. It belongs to the class and hence, it is called a class variable and is accessed via the class name.
Question 8
............... is the feature by means of which one class acquires the properties of another class.
- Abstraction
- Inheritance
- Encapsulation
- Polymorphism
Answer
Inheritance
Reason — Inheritance is the feature by means of which one class acquires the properties of another class.
Question 9
The class that gets inherited is known as ............... .
- Parent class
- Base class
- Super class
- All of these
Answer
All of these
Reason — The class that gets inherited is known as a parent class, base class and super class as well.
Question 10
When many sub classes are inherited from a single base class, it is known as ............... .
- Hierarchical inheritance
- Multiple inheritance
- Single inheritance
- Multilevel inheritance
Answer
Hierarchical inheritance
Reason — When many sub classes are inherited from a single base class, it is known as Hierarchical inheritance.
