answersLogoWhite

0

Java is an object oriented language, which means that one of its core principles is inheritance. All classes (and hence the objects created from them) are derived from a parent. In this way, classes inherit variables, methods, and classes from their parent so that they do not have to redefine them. In Java's case, the common parent of all classes is Object. This gives every class some basic functionality, such as the equals, toString, and wait methods. Besides uniformity, another advantage of inheritance is clear organization. Imagine if we could not guarantee the comparison of two objects with the equals method. Finally, a global parent class means that every class, no matter how specific, can be generalized into the parent's type (Object o = new String()).

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What common ancestor do two or more descendants share?

The common ancestor that two or more descendants share is a shared ancestor from whom they both or all descend.


Which organisms have possible common ancestor?

All of them


What was LU-CA?

LUCA stands for Last Universal Common Ancestor, the last organism that is the common ancestor of all life on Earth.


Do birds and reptiles share a common ancestor?

Yes. If you go back far enough, all life on Earth shares a common ancestor.


What is the common ancestor of the leopard and cheetah?

A bobcat is a specie of lynx, which is a member of the family Felidae or cat family.


What primate is the relative to the common ancestor of all primates?

lemur


Why java is not a complete object oriented language?

Java is not a completely object oriented language, because not all values in Java are Objects. For example, the basic numeric types such as int, long, double, etc., are not objects and need to be "boxed" into objects in order to pass them as Object parameters or call methods on them.


What is our evidence of Luca, the common ancestor that we can link all living organisms to?

Scientists have identified Luca as the Last Universal Common Ancestor, or the common ancestor of all living organisms. Evidence for Luca comes from the study of genetic material and the similarities found in the genetic code of different species.


The fact that all organisms have DNA as their genetic material is evidence that?

all organisms share a common evolutionary ancestry. The universal presence of DNA suggests a common genetic code that has been inherited from a common ancestor. This supports the theory of evolution and the idea that all living things are connected through a shared genetic history.


Why comparator has equals method?

The Java superclass Object says that all Java objects have an equals method. Thus Comparator has an equals method.


What primate is the closest relative to the common ancestor of all primates?

lemur


What are you to your aunts mother in law?

You could be their grandchild. Or you may not be related at all, as not sharing a common ancestor.