I don't want my class to be inherited by any other class. What should I do?

1 Like

You should declared your class as final. But you can’t define your class as final, if it is an abstract class. A class declared as final can’t be extended by any other class.