class Plant { Plant() { System.out.println("Plant created"); } } class Tree extends Plant { Tree() { System.out.println("Tree created"); super(); } } public class Test { public static void main(String args[]) { Tree tree = new Tree(); } }
Plant() {
System.out.println("Plant created");
}
class Tree extends Plant {
Tree() {
System.out.println("Tree created");
super();
public class Test {
public static void main(String args[]) {
Tree tree = new Tree();
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.