Answered Questions

  • is it possible to inherit a class that has only private constructor?

    Sujit

    • Feb 18th, 2019

    Nope. We cant inherit a class if it has Private constructor.

    Vikas Kumar Bhatnagar

    • Aug 14th, 2018

    We cant inherit the abstract class and when we declared a class as abstract and define the private constructor .
    Following compilation error:
    Cannot create an instance of the abstract class or interface Singleton.
    Singleton.Singleton() is inaccessible due to its protection level