I am having a class \'ClassA\' which is having private constructor.
public final class ClassA{
private ClassA{
}
public static void main(String[] arg)
I would suggest composition instead of inheritance (maybe that's what the designer of ClassA intended for class usage. Example:
public class ClassB {
private ClassA classA;
ClassB() {
// init classA
...
}
public ClassA asClassA() {
return classA;
}
// other methods and members for ClassB extension
}
You can delegate methods from ClassB to ClassA or override them.