Explain encapsulation in Java.
Encapsulation is the process of wrapping variables and functions together into a single unit in order to hide the unnecessary details. The wrapped up entities are called classes in java. Encapsulation is also known as data hiding because it hides the underlying intricacies.
🔗Reference: stackoverflow.com
🔗Source: Java Interview Questions and Answers