WAP to invoke constructors using super keyword in java

468 views

Published on

WAP to invoke constructors using super keyword in java

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
468
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

WAP to invoke constructors using super keyword in java

  1. 1. //Ques. 12 WAP to invoke constructors using super keyword . class Vehicle { Vehicle() {System.out.println("n Vehicle is created"); } } class Bike extends Vehicle { Bike() { super(); System.out.println("n Bike is created"); } public static void main(String args[]) { Bike b=new Bike(); } } OUTPUT:-

×