A process of wrapping code and data together into a single unit, for example, a capsule which is mixed of several medicines.
Encapsulation in Java
How can you create a fully encapsulated class in Java?
By making all the data members of the class private. Now we can use setter and getter methods to set and get the data in it.
Which Java class is an example of a fully encapsulated class?
The Java Bean class
By providing only a setter or getter method, you can make the class -?
Read-only or write-only
An advantage of encapsulation is it provides you control over the -?
Data
What is the term for other class will not be able to access the data through the private data members?
Data hiding
The encapsulate class is easy to -?
Test
What are the two types of modifiers in Java?
Access modifiers and non-access modifiers
The access modifiers in java specifies - (scope) of a data member, method, constructor or class.
Accessibility
What are the 4 types of java access modifiers?
Private, default, protected, & public