public class Test PXLLinux联盟
{PXLLinux联盟
public static void main(String[] args) PXLLinux联盟
{PXLLinux联盟
Child child = new Child();PXLLinux联盟
}PXLLinux联盟
}
class ParentPXLLinux联盟
{PXLLinux联盟
Parent() PXLLinux联盟
{PXLLinux联盟
System.out.println("to construct Parent.");PXLLinux联盟
}PXLLinux联盟
}
class Child extends ParentPXLLinux联盟
{PXLLinux联盟
Child() PXLLinux联盟
{PXLLinux联盟
System.out.println("to construct Child.");PXLLinux联盟
}PXLLinux联盟
Delegatee delegatee = new Delegatee();PXLLinux联盟
}
class Delegatee PXLLinux联盟
{PXLLinux联盟
Delegatee()PXLLinux联盟
{PXLLinux联盟
System.out.println("to construct Delegatee.");PXLLinux联盟
}PXLLinux联盟
}