Atitit Multiple Inheritance Implementation Solution Java C #
Java C # does not provide a multiple-inheritance solution: The default is from the language level and no way to inherit more .
only the level of the Cub Class library can be implemented pull .
the principle of inheritance is to use an internal super Pointer to point to the Superclass. We can define multiple Super hands Away OK LAN ..
Atitit using internal classes to implement multiple inheritance
use to define multiple super pointers for implementation :
Super name , or super prefix , number . Middle IDE Easy Hints Inside. ..
of course, without native language support, there is a level of invocation, a bit more hassle. But it would be nice to have a super prefix, too.
Package com.alipay.config;
public class Multiinherson extends MultiInherParent1 {
MultiInherParent2 super_prt2=new MultiInherParent2 ();
MultiInherParent1 super_prt3=new MultiInherParent1 ();
public static void main (string[] Args) {
Multiinherson son=new Multiinherson ();
SON.M1 ();
SON.SUPER_PRT2.M2 ();
SON.SUPER_PRT3.M1 ();
}
author:: Nickname :Old Wow's Claws( Full name::AttilaxAkbar Al Rapanui Attilaksachanui)
Kanji name: Etila ( Ayron) , email:[email protected]
reprint please indicate source: http://www.cnblogs.com/attilax/
Atiend
Atitit Multiple Inheritance Implementation solution Java C #