ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
MCQ JAVA - JAVA ENCAPSULATION MCQ Questions
English
Hindi
Question No. -
01
Report Bug
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
Report Bug
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
Report Bug
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
Report Bug
Which keyword allows Inheritance?
Which keyword allows Inheritance?
A.
extend
extend
B.
extends
extends
C.
for
for
D.
protected
protected
Question No. -
05
Report Bug
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
Report Bug
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
Report Bug
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
Report Bug
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. -
09
Report Bug
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
1
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Exam Quiz
Website development Company in Allahabad