answersLogoWhite

0

You can create a class that does not inherit from anything and nothing inherits from it. You can then create objects from that class. This allows you to encapsulate and abstract data and methods into a simple interface to be used elsewhere in your program.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the Difference between multilevel and multiple inheritance?

Multiple Inheritance : we can inherit more than one class in the same class. Multi-Level Inheritance: where one class can inherit only one base class and the derived class can become base class of some other class.


Benefits of inheritance in Java programming?

Advantages of Inheritance1) Code Re-usability2) consumes less time3) Without changing the super class we can add some more methods in the super class by inheriting it in the derived class


How can you write multiple inheritance program in java?

Java does not support direct multiple inheritance. You can implement partial multiple inheritance using interfaces. ex: public class ExMultInherit implements interface1, interface2, interface 3 { ... .... ...... }


What is the difference between composition and inheritance?

Composition & inheritance are totally different from each other. Composition means to compose the properties by code of same class. In composition we can refer to some other class who hold the same properties but we have to code, we can not directly use that code ,we have to rewrite . Whereas in Inheritance, whenever a class uses the properties of another class and that class has its own properties too then the process of accessing the properties of another class is known as Inheritance... If we think as real life example, If we are inspired by someone, we adore the properties of that person then we add that quality of person in ourselves ,that is composition. But some quality of our parent are automatically in us there is no need to strive, that is inheritance. (sdrishti7@gmail.com)


Why is multiple inheritance implemened through interfaces?

Interfaces have only methods declared and not defined. So that these various methods can be altered or customized or written according to the need. Hence Multiple inheritance is implemented through Interfaces.Interface is a progam which just declares various methods or functions, so that any user can write the contents of that method declaration.AnswerTrue Multiple Inheritance refers to the ability to inherit from multiple CLASSES. Thus, a true multiple inheritance language does not use interfaces. However, many single-inheritance languages provide most of the benefits of the multiple inheritance concept by using interfaces (Java, for example). The problem with true Multiple Inheritance is twofold:(a) at the compiler and runtime level, it is often difficult to determine which method is being referred to, as M.I. can lead to very convoluted (and sometimes conflicting) namespaces(b) there is no specific superclass, which can lead to problems with determining relationships between classesUsing a S.I. model with interfaces avoids these two problems.


When shall you use Multiple Inheritance?

Multiple inheritance is used when a new class to be formed has to inherit characteristics from two or more classes. eg: class scientist class labourer | | | | V V -------------------------------- | class employee | -------------------------------- Multilevel inheritance is used if a derived class inherits characteristics from a base class which is a derived class (intermmediate base class). If the inheritance level is more than two then it is a multilevel inheritance. eg: class Grandfather | | V class Father | | V class son


Why is cyclic inheritance not in any programming language?

Cyclic inheritance is physically impossible. A base class cannot inherit from one of its own derivatives any more than you could inherit some generic trait from one of your own descendants. Inheritance is strictly a one-way street.


Which type of inheritance does not support by java?

Desoola Anil Kumar, Java Faculty: There are 5 types of Inheritance. 1.Single inheritance, 2.Multiple inheritance, 3.Multilevel Inheritance, 4. Hirarichal inheritance and 5. Hybrid inheritance. Java supports multi level inheritance and hirarichal inheritance.


What is inheriting?

In computer terms, or more specifically in software design terms, inheritance is a method used with object oriented programming. In object oriented programming, object types (classes) are defined to model portions of a solution. Inheritance provides a simple method to derive one class from another, such that the derived class can make use of the original class' features and behavior, and enrich it with new aspects.Many, but not all, programming languages also support restricting the original class' features, some even allow changing aspects of the original class.For example, a simple Chess game could define a class for a figure. The Figure class would have one of two colors (black, white), and it would have a current position on the board, or it would be designated "off the board".One could now derive a new class from the Figure class, for example, a King, a Queeen, a Knight, etc. Each of the derived classes ill have the Figure class' attributes (color, position, on/off board) thanks to inheritance, but each would have specific characteristics (for example different validation for a planned move, which determine whether an intended move is possible).


What is visibility mode what are the different inheritance visibility modes support by c plus plus?

There is no such thing as visibility mode in C++. Visibility is a function of information hiding but that relates to the way in which implementation details can be obfuscated within binary executables and libraries where only the interface need be exposed in a plain-text header file. This has nothing whatsoever to do with object oriented programming since information hiding is also possible in C. You probably meant access specifiers. There are three levels: private, protected and public. Private access limits access to the class and to friends of the class. Protected is the same as private but extends access to derivatives of the class. Public access imposes no limits. In terms of inheritance, the specified access level determines the accessibility of the protected and public members of the base class (private members are never inherited and will always remain private to the base class). in essence, members with access greater than the specified inheritance are reduced to the specified access. Thus if you specify protected inheritance, all public members of the base class become protected members of the derivative, while private inheritance reduces all public and protected members to private access. You may also reduce access to specific base class members simply be redeclaring them with the appropriate access.


What is inheritance in core java?

Inheritance is the ability to derive and use other class's attribute and behavior. It results in the reduction of coding lines and the reuse of same codings in some other places. It is an important concept for java and makes to program easily...


What is an acorn worm?

An acorn worm is a member of a class of worms, Enteropneusta, with some features of chordates.