Preventing call of a private constructor from within the class in java

Posted by code_pro on Stack Overflow See other posts from Stack Overflow or by code_pro
Published on 2010-05-23T19:04:01Z Indexed on 2010/05/23 19:10 UTC
Read the original article Hit count: 303

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about constructor