4
Reply

What are the ways by which you can make sure that a class can not be inherited by other classes?

    Only By Using the Sealed Class or by creating the Private Constructor of it.

    1)By using Static Class

    2)By using Sealed Class.

    above both classes cannot be Inherited

    sealed classes cannot be inherited by other classses. 

    i) make it sealed (C#)
    ii) Declare the constructor as private.