If you have a private constructor in your class you can still instatiate the class in that particular class. You cannnot however instantiate it in any other class.
We can do this by putting an abstract method in that class. This is because if their is any abstract method in the class then that class must be declared abstract.
yes by making the constructor of a class private we can achieve this. Since the private modifier is accessible withing the class when a class outside this class tries to instantiate this class it gives error as the class cannot be instantiated.
Only abstract classes can not be instantiated. If you make the constructor private then you can not instantiate it outside of the class but you can still instantiate it within the same class.