You should go with private
constructor.
If your class is abstract, it can be extended and objects can be created. As per my understanding from the question, what you want is non instantiable class.
from Item 4 of Effective java :
Attempting to enforce noninstantiability by making a class abstract does not work. The class can be subclassed and the subclass instantiated. Furthermore, it misleads the user into thinking the class was designed for inheritance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With