Preventing call of a private constructor from within the class in java
- by code_pro
Hi
We can resrict the creation of object of a class by making it's constructor private.
But this constructor could still be called from within the class.
is there anyway to prevent this in Java?
Thnx.