Menu mobile
Home
PYTHON
Python Tutorial
Program Example
Interview Questions
JAVA
Java Tutorial
Program Example
Interview Questions
C Language
C Tutorial
Program Example
Interview Questions
Web Design
HTML
CSS
Java Script
PHP
Assignment
MS Office
HTML
CSS
Java Script
JQuery
AngularJs
QUIZ ON : JAVA - ENCAPSULATION AND INHERITANCE
ENCAPSULATION AND INHERITANCE
00:00:00
English
Hindi
Question No# :
01
Which access specifier allows accessibility of a member only within the same class where it is declared?
Which access specifier allows accessibility of a member only within the same class where it is declared?
A.
public
public
B.
private
private
C.
protected
protected
D.
default
default
Question No# :
02
Wrapping up of data and method into a single unit is called___
Wrapping up of data and method into a single unit is called___
A.
Encapsulation
Encapsulation
B.
Abstraction
Abstraction
C.
Inheritance
Inheritance
D.
Polymorphism
Polymorphism
Question No# :
03
An OOP feature that allows all members of a class to be the members of another class.
An OOP feature that allows all members of a class to be the members of another class.
A.
Encapsulation
Encapsulation
B.
Abstraction
Abstraction
C.
Inheritance
Inheritance
D.
Polymorphism
Polymorphism
Question No# :
04
Which keyword allows Inheritance?
Which keyword allows Inheritance?
A.
extend
extend
B.
extends
extends
C.
for
for
D.
protected
protected
Question No# :
05
Which access specifier allows accessibility by all classes in the same package, but only by subclasses in a different package?
Which access specifier allows accessibility by all classes in the same package, but only by subclasses in a different package?
A.
public
public
B.
private
private
C.
protected
protected
D.
default
default
Question No# :
06
A static member a is declared in a class named ‘Myclass’, write the statement to initialise it with 5, from a function in another class.
A static member a is declared in a class named ‘Myclass’, write the statement to initialise it with 5, from a function in another class.
A.
a=5;
a=5;
B.
a of Myclass=5;
a of Myclass=5;
C.
Myclass.a=5;
Myclass.a=5;
D.
a.Myclass=5;
a.Myclass=5;
Question No# :
07
Which feature can be implemented using encapsulation?
Which feature can be implemented using encapsulation?
A.
Inheritance
Inheritance
B.
Abstraction
Abstraction
C.
Polymorphism
Polymorphism
D.
Overloading
Overloading
Question No# :
08
How can Encapsulation be achieved?
How can Encapsulation be achieved?
A.
Using Access Specifiers
Using Access Specifiers
B.
Using only private members
Using only private members
C.
Using inheritance
Using inheritance
D.
Using Abstraction
Using Abstraction
Question No# :
09
What is the purpose of an abstract class
What is the purpose of an abstract class
A.
To provide help with database
connectivity
To provide help with database
connectivity
B.
To provide data input to other classes
To provide data input to other classes
C.
To provide security to other classes
To provide security to other classes
D.
To provide an appropriate base class
from which other classes can inherit
To provide an appropriate base class
from which other classes can inherit
Question No# :
10
Inheritance is referred to as
Inheritance is referred to as
A.
"is a" relationship
"is a" relationship
B.
"have a" relationship
"have a" relationship
C.
Both A and B
Both A and B
D.
None of These
None of These
Previous
1
Next
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Sarkari Exam Quiz