1.

How we can make a read-only class in Java?

Answer»

By Read-only CLASS we are referring to the "IMMUTABLE" CONCEPT. You can begin by defining a class so that no methods can CAUSE changes to the internal state.

In such classes, aliasing will have no impact because its internal state is read-only.

45. How we can make a write-only class in JAVA?


Discussion

No Comment Found