Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : java - JAVA ENCAPSULATION
JAVA ENCAPSULATION
00:00:00
English
Hindi
Question No# :
01
out of 9
Which keyword allows Inheritance?
Which keyword allows Inheritance?
A.
extend
extend
B.
extends
extends
C.
for
for
D.
protected
protected
Question No# :
02
out of 9
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# :
03
out of 9
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# :
04
out of 9
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# :
05
out of 9
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# :
06
out of 9
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# :
07
out of 9
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
Question No# :
08
out of 9
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# :
09
out of 9
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
Latest Current Affairs 2025
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2025
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