18/06/12 06:11:33.73 AQnxwR2X0.net
>>12
URLリンク(docs.oracle.com)
If a constructor body does not begin with an explicit constructor invocation and
the constructor being declared is not part of the primordial class Object,
then the constructor body implicitly begins with a superclass constructor
invocation "super();", an invocation of the constructor of its direct superclass
that takes no arguments.
コンストラクタの呼び出しが明示されてなければ
super()が暗黙的に呼ばれますよと
public SubClass(String val) {
// ここでsuper()が呼ばれる
System.out.println(val);
}
Javaの資格試験の勉強してるなら紫本とか黒本とか
読んだ方がいんじゃないかな
毎回言語仕様調べるの大変でしょ
コンストラクタについても丁寧に解説されてるよ