SlideShare a Scribd company logo
//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:-
WAP to invoke constructors using super keyword in java

More Related Content

PPTX
OpenStreetMap is Data
PDF
Sprint 36 review
PDF
Sprint 38 review
PDF
Storm over gearpump
PPTX
Sprint 16 report
PDF
Sprint 43 Review
DOCX
Er. Model Of Hospital Management
DOCX
Fcfs Cpu Scheduling With Gantt Chart
OpenStreetMap is Data
Sprint 36 review
Sprint 38 review
Storm over gearpump
Sprint 16 report
Sprint 43 Review
Er. Model Of Hospital Management
Fcfs Cpu Scheduling With Gantt Chart

More from One97 Communications Limited (20)

PPTX
Neural Interfacing
PPT
Blue eye technology
PPTX
Computer Forensics
PPTX
Protect Folders without using any Software
PPTX
Introduction to Java Programming
DOCX
WAP to find out whether the number is prime or not in java
DOCX
Overriding abstract in java
DOCX
How to achieve multiple inheritances by using interface in java
DOCX
Method overriding in java
DOCX
WAP to implement inheritance and overloading methods in java
DOCX
program on Function overloading in java
DOCX
Program on usage of Final keyword in java
DOCX
WAP to initialize different objects with different values in java
DOCX
Conversion of data types in java
DOCX
Constructor Overloading in java
Neural Interfacing
Blue eye technology
Computer Forensics
Protect Folders without using any Software
Introduction to Java Programming
WAP to find out whether the number is prime or not in java
Overriding abstract in java
How to achieve multiple inheritances by using interface in java
Method overriding in java
WAP to implement inheritance and overloading methods in java
program on Function overloading in java
Program on usage of Final keyword in java
WAP to initialize different objects with different values in java
Conversion of data types in java
Constructor Overloading in java
Ad

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
1_English_Language_Set_2.pdf probationary
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
IGGE1 Understanding the Self1234567891011
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Types and Its function , kingdom of life
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Trump Administration's workforce development strategy
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
1_English_Language_Set_2.pdf probationary
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Hazard Identification & Risk Assessment .pdf
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Digestion and Absorption of Carbohydrates, Proteina and Fats
History, Philosophy and sociology of education (1).pptx
IGGE1 Understanding the Self1234567891011
Weekly quiz Compilation Jan -July 25.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Classroom Observation Tools for Teachers
Cell Types and Its function , kingdom of life
Supply Chain Operations Speaking Notes -ICLT Program
Indian roads congress 037 - 2012 Flexible pavement
Unit 4 Skeletal System.ppt.pptxopresentatiom
Chinmaya Tiranga quiz Grand Finale.pdf
Trump Administration's workforce development strategy
Ad

WAP to invoke constructors using super keyword in java

  • 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:-