answersLogoWhite

0


Best Answer

In Java, you use the final modifier to prevent a class from having any subclasses.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What modifier do you use to prevent that class from having any subclasses?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you access a protected member from a Sub class outside the package of its Base class?

Protected members of a class are only accessible to its subclasses and to friends of the class or its subclasses. However, if a subclass changes the access to private, only the subclass and its friends have access but this does not affect the access rights of its ancestors or their friends.


What is topleval class in java?

The top level class in Java is "Object." All other classes are subclasses of Object by default.


Which access modifier makes an element available anywhere to any class?

The public access modifier will make an element available to any class.


What is a super class in terms of object oriented programming?

A superclass, also referred to as a parent class, is a class what which other classes are derived from. These derived classes are known as either subclasses or child classes.


What is transitive nature of inheritance?

Inheritance is transitive, i.e., if a class B inherits properties of another class A, then all subclasses of B will automatically inherit the properties of class A.


What is mean by accessibility?

Class access is the ability for any given class to access the functions of another class. Private access limits access to data and code just to the class that contains the private access modifier. The so-called "default" access grants private access, as well as access to any class in the same package. Protected access grants the same as "default" access, and also allows subclasses to access the code and data. Public access allows any class in any package to access the code and data.


What is mean by class access?

Class access is the ability for any given class to access the functions of another class. Private access limits access to data and code just to the class that contains the private access modifier. The so-called "default" access grants private access, as well as access to any class in the same package. Protected access grants the same as "default" access, and also allows subclasses to access the code and data. Public access allows any class in any package to access the code and data.


What is the scientific name for mussels?

Mussels as a group comprise many different species in the class Bivalvia; they are mainly found in the three subclasses Pteriomorphia, Paleoheterodonta and Heterodonta. Kingdom: Animalia Phylum: Mollusca Class: Bivalvia Subclasses | Pteriomorpha (marine mussels) Palaeoheterodonta (freshwater mussels) Heterodonta (zebra mussels)


Why is chondrichtyes in class?

Chondrichthyes are divided into two subclasses, these are elasmobranchii, and holocephali. These are both marine species and have skeletons made out of cartilage.Ê


Subclasses of an abstract class that do not provide an implementation of an abtract method are also abstract?

Yes. Any class that does not provide implementation to all its methods as well as its parent class methods needs to be Abstract. The Java compiler would not successfully compile a class that does not do this.


Why do you have to retest subclasses that are instantiated from an existing class if the existing class has already been thoroughly tested?

i dont even know it !!!! that why i came to this website to find answer not for me to answer the dam question.


What are subclasses of container class?

This chapter covers a special type of Component called Container. A Container is a subclass of Component that can contain other components, including other containers. Container allows you to create groupings of objects on the screen. This chapter covers the methods in the Container class and its subclasses: Panel, Window, Frame, Dialog, and FileDialog. It also covers the Insets class, which provides an internal border area for the Container classes.