What is the inheritance of the interface?
The inheritance interface is a mechanism in some computer languages where specific features are inherited by the class, and then this particular class must provide implementation for these functions to complete. The interfaces exist only in certain object -oriented programming languages. They can be used to emulate multiple heritage without actually allowing the class to be inherited, as there are generally no limits of the number of interfaces from which the class can inherit. In addition to unimpleted methods, the interface may also include public constants. So if class X inherited from Y interfaces, any case of class X would also be an example of Y -class. This complicates when the inheritance of the class interface includes more than one separate interface. For each additional interface that is inherited, the resulting class can be legitimately used as an instance of each of them. If the class inherited from ten different interfaces, the objects of this class could be used as an instance of eleven different objectionskts, including yourself.
Such complex inheritance is often not necessary. The inheritance of the interface is used to ensure that the class has a specific set of desired behavior, and this behavior allows it to perform different features that it could not otherwise do. A common example is the Actionlistener interface in Java, which requires the class to implement only one particular method. Successful implementation of this method allows the user to control buttons, menu items, or any other window object in the classroom if desired. The inheritance of the interface is a relatively simple way to add comprehensive functions to the class without fearing the most complicated inheritance problems.
One of the biggest advantages of NG interfaces is that it allows the use of specific objects in the general sense. Because the class that implements the interface is an instance of this interface, any place can be used, the request isAdvance an instance of this interface. For example, if Class A implements C -Class C and Class B also implements class C if the method takes as a class C instance parameter, either class A instance or Class B instance would be an acceptable parameter. The interfaces cannot be equipped separately because they are not complete, so there would never be an object that is a purely C -C -Class instance as a parameter.