answersLogoWhite

0


Best Answer

Declare it final.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Declare the class final.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you create a class which cannot be inheritable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do create your own class on battlefront 2?

You cannot create your own class in Battlefront 2. That feature was created in later games in the series.


How can you create a virtual copy constructor?

You cannot. Constructors are specific to the class in which they are declared. They cannot be inherited and so they cannot be virtual.


What is the need to create an abstract class without abstract?

Actually there is no need & most importantly - you cannot create an abstract class without using the abstract keyword


Create an instance to an abstract class?

You cannot create an instance of an abstract class. For ex: Public abstract AbsTest { … } AbsTest ex = new AbsTest(); Lets say we have a class declaration AbsTest that is abstract and then I try to instantiate it, the compiler will give me an error stating that "An Abstract class cannot be instantiated"


Stiff man disease is it inheritable?

No, SPS is not inheritable.


Is an altered gene in a zygote inheritable?

is an altered gene in egg is inheritable


Can you have a final abstract class?

No. The abstract keyword means that you cannot instantiate the class unless you extend it with a subclass. The final keyword means that you cannot create subclasses of that class.Combining them would lead to an unusable class, so the compiler will not let this happen.


Why class is not protected in c?

In C#, the concept of protected is to be accessible to derived classes.Let's assume that a class can be modified as protected. When you want to subclass from such class, wait, you cannot see that class, because only the derived classes can see it, but the one you want to create is not one of them (yet).... I think this is the reason a class cannot have protected accessibility


Is Multiple Sclerosis inheritable?

no


Is polio inheritable?

Not by birth


Is twisted bowel inheritable?

No。


Is adaptation inheritable?

yes