当前位置: 技术问答>java相关
about "extends inner class",please come in
来源: 互联网 发布时间:2017-04-23
本文导语: class Mate{ class BrotherOfMate{ BrotherOfMate(){ System.out.println("construct BrotherOfMate"); } } Mate(){ System.out.println("construct Mate"); } } public class f9 extends Mate.BrotherOfMate{ //f9 继承,此处该如何写? f9(){ Sys...
class Mate{
class BrotherOfMate{
BrotherOfMate(){
System.out.println("construct BrotherOfMate");
}
}
Mate(){
System.out.println("construct Mate");
}
}
public class f9 extends Mate.BrotherOfMate{
//f9 继承,此处该如何写?
f9(){
System.out.println("construct f9(I)");
}
public static void main(String[] args){
new f9();
}
class BroterOfI {
//BrotherOfI 继承,此处该如何写?
BroterOfI(){
System.out.println("construct BrotherOfI");
}
}
}
class BrotherOfMate{
BrotherOfMate(){
System.out.println("construct BrotherOfMate");
}
}
Mate(){
System.out.println("construct Mate");
}
}
public class f9 extends Mate.BrotherOfMate{
//f9 继承,此处该如何写?
f9(){
System.out.println("construct f9(I)");
}
public static void main(String[] args){
new f9();
}
class BroterOfI {
//BrotherOfI 继承,此处该如何写?
BroterOfI(){
System.out.println("construct BrotherOfI");
}
}
}
|
class Mate{
class BrotherOfMate{
BrotherOfMate(){
System.out.println("construct BrotherOfMate");
}
}
Mate(){
System.out.println("construct Mate");
}
}
public class f9 extends Mate.BrotherOfMate{
//f9 继承,此处该如何写?
f9(Mate m){
m.super();
System.out.println("construct f9(I)");
}
public static void main(String[] args){
Mate m = new Mate();
f9 new_f9 = new f9(m);
f9.BroterOfI bo = new_f9.new BroterOfI(m);
}
class BroterOfI extends Mate.BrotherOfMate{
//BrotherOfI 继承,此处该如何写?
BroterOfI(Mate m){
m.super();
System.out.println("construct BrotherOfI");
}
}
}
class BrotherOfMate{
BrotherOfMate(){
System.out.println("construct BrotherOfMate");
}
}
Mate(){
System.out.println("construct Mate");
}
}
public class f9 extends Mate.BrotherOfMate{
//f9 继承,此处该如何写?
f9(Mate m){
m.super();
System.out.println("construct f9(I)");
}
public static void main(String[] args){
Mate m = new Mate();
f9 new_f9 = new f9(m);
f9.BroterOfI bo = new_f9.new BroterOfI(m);
}
class BroterOfI extends Mate.BrotherOfMate{
//BrotherOfI 继承,此处该如何写?
BroterOfI(Mate m){
m.super();
System.out.println("construct BrotherOfI");
}
}
}