ENCAPSULATION Flashcards

1
Q

access specifier provides access to the data members, and the data methods limit to the class itself.

A

Private

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

access specifier provides the access specifications to a class so that it can be accessed from anywhere within the program.

A

Public

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

is the first line of data hiding. If any class in Java is not mentioned with an access specifier, then the compiler will set as the access specifier.

A

Default

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

a class’s variables are hidden from other classes and can only be accessed by the methods of the class in which they are found.

A

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

It is done in the form of a secure field accessible by only the members of the same class.

A

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Powerful mechanism for storing the data members and data methods of a class together.

A

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

access specifier protects the class methods and members similar to the private access specifier.

A

Protected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly