Would this program compile run? If not, why; if yes: what would be the output? public class ConstChaini { public static void mai
n(String [] args){ new SubClass(); System.out.println(); new SubClass(1); } class SuperClass{ public SuperClass(){ System.out.print(-4-); } public SuperClass(int i){ System.out.print("8"); } } class SubClass extends SuperClass( public SubClass()( this(1e); System.out.print(C"); } public SubClass(int i){ super(i); System.out.print("D"); }
Now each time when a object of a subclass is been created it's super class constructor will be executed first then only subclass object is created by executing it's constructor.
Professionalism in a workplace setup is acting in a responsible and fair manner in all your personal and work activities. It is always seen as sign of maturity and self-confidence. This work value includes learning every aspect of a job and performing it to the best of your God given ability.