About Question enthuware.ocajp.i.v8.2.1334 :
Posted: Tue Oct 17, 2017 7:47 am
Hi!!
I just would like to confirm one thing about constructors.
One of the rules constructor (OCA 8, Jeanne Boyarsky and Scott Selikoff) says that: "If no super() call is declared in a constructor, Java will insert a no-argument super() as the first statement of the constructor", it doesn´t matter if there are more constructors in the class?:
B(){ super("good bye"); };
B(String s){ }//here the JVM introduce a super(), isn´t it???
B(String s1, String s2){ this(s1 + s2 + " ! "); }
Thank you very much Enthuware!!
I just would like to confirm one thing about constructors.
One of the rules constructor (OCA 8, Jeanne Boyarsky and Scott Selikoff) says that: "If no super() call is declared in a constructor, Java will insert a no-argument super() as the first statement of the constructor", it doesn´t matter if there are more constructors in the class?:
B(){ super("good bye"); };
B(String s){ }//here the JVM introduce a super(), isn´t it???
B(String s1, String s2){ this(s1 + s2 + " ! "); }
Thank you very much Enthuware!!