What will be the output of following program ?
package quiz; public class SuperClass { protected SuperClass(){ System.out.print("super "); } }
package quiz; public class SubClass extends SuperClass{ private SubClass(){ System.out.print("sub "); } public static void main(String[] args) { new SuperClass(); class InnerClass{ private InnerClass() {System.out.print("inner ");} {new SubClass();} {new SuperClass();} } new InnerClass(); } }
© 2015 – 2016, https:. All rights reserved. On republishing this post, you must provide link to original post