オブジェクト向け_継承中の構築メソッドの関係
/*
A:
B: ?
, 。
, ,
: :super();
*/
class Father{
public Father(){
System.out.println("Father ");
}
public Father(String name){
System.out.println(name+"\t"+"Father ");
}
}
class Son extends Father{
public Son(){
//super();
System.out.println("Son ");
}
public Son(String name){
//super();
System.out.println(name+"\t"+"Son ");
}
}
class ExtendsDemo6{
public static void main(String[] args){
//
Son s = new Son();
System.out.println("-----------");
Son s2 = new Son(" ");
}
}