Tech
Part 4 - Tightly Encapsulated Class in Java
After learning Data Hiding , Abstraction , and Encapsulation , let's explore a concept that frequently appears in Java interviews and certification exams: Tightly Encapsulated Class .
At first glance, you might think a tightly encapsulated class is simply a class with private variables and public getters and setters.
That's a common misconception.
In Java, the definition is much simpler—and much stricter.
There is only one rule you need to check.
In this article, we'll under...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to