/**
*
*/
package com.mischen.cn;
/**
* @author mischen
*
*/
public class Child extends Parent{
private Child(){
this(1);
System.out.print("B");
}
protected Child(int i){
System.out.print("C");
}
public static void main(String[] args) {
new Child();//ACB
new Child(1);//AC
}
}
class Parent{
public Parent(){
System.out.print("A");
}
}
new Child();new Child(1);
最新推荐文章于 2022-07-25 22:13:06 发布