javinpaul
1 min readMay 27, 2019

--

This is another way to prevent instantiation of the class, used along with factory pattern and singleton whether you want to ensure that getInstance() or similar method should be used to create an object instead of the constructor.

--

--

javinpaul
javinpaul

Written by javinpaul

I am Java programmer, blogger, working on Java, J2EE, UNIX, FIX Protocol. I share Java tips on http://javarevisited.blogspot.com and http://java67.com

No responses yet