SlideShare a Scribd company logo
1 of 1
Download to read offline
What is an interface ?
How is extending a class different from implementing an interface ?
Solution
Interface :-
Interface is also one type class; it is a fully un-implemented class. It is used for creating a new
type of object only by declaring set of operations of this object. So interface contains only public
static final variables and public abstract methods for declaring object operations. Interface is
mainly introduced to develop multiple implementation inheritance.
How is extending a class different from implementing an interface ?
Because a class can extend an another class.
But one and only a class implements an interface.
Example :-
Interface I1 { }
Interface I2 { }
class A { }
class c extends A { }
class c extends A implements I1,I2 { }

More Related Content

More from nishadvtky

You are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdfYou are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdfnishadvtky
 
Describe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdfDescribe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdfnishadvtky
 
Why do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdfWhy do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdfnishadvtky
 
Which of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdfWhich of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdfnishadvtky
 
Which system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdfWhich system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdfnishadvtky
 
Which of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdfWhich of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdfnishadvtky
 
Using Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdfUsing Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdfnishadvtky
 
what are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdfwhat are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdfnishadvtky
 
What are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdfWhat are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdfnishadvtky
 
What are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdfWhat are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdfnishadvtky
 
Three kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdfThree kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdfnishadvtky
 
There are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdfThere are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdfnishadvtky
 
The parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdf
The parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdfThe parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdf
The parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdfnishadvtky
 
The following table lists the etiologies (cause) of illness associate.pdf
The following table lists the etiologies (cause) of illness associate.pdfThe following table lists the etiologies (cause) of illness associate.pdf
The following table lists the etiologies (cause) of illness associate.pdfnishadvtky
 
The color of the neutrophils cytoplasm is a very () pink or blue .pdf
The color of the neutrophils cytoplasm is a very () pink or blue .pdfThe color of the neutrophils cytoplasm is a very () pink or blue .pdf
The color of the neutrophils cytoplasm is a very () pink or blue .pdfnishadvtky
 
Thank you Let X and Y have the joint p.m.f. given by Find the margi.pdf
Thank you Let X and Y have the joint p.m.f. given by  Find the margi.pdfThank you Let X and Y have the joint p.m.f. given by  Find the margi.pdf
Thank you Let X and Y have the joint p.m.f. given by Find the margi.pdfnishadvtky
 
State with reason if the following signals are periodic. If periodic,.pdf
State with reason if the following signals are periodic. If periodic,.pdfState with reason if the following signals are periodic. If periodic,.pdf
State with reason if the following signals are periodic. If periodic,.pdfnishadvtky
 
Shown in the diagram is a simple biochemical pathway. The substrates.pdf
Shown in the diagram is a simple biochemical pathway. The substrates.pdfShown in the diagram is a simple biochemical pathway. The substrates.pdf
Shown in the diagram is a simple biochemical pathway. The substrates.pdfnishadvtky
 
Select a recent Internet scandaleventnews media happening. Describ.pdf
Select a recent Internet scandaleventnews media happening. Describ.pdfSelect a recent Internet scandaleventnews media happening. Describ.pdf
Select a recent Internet scandaleventnews media happening. Describ.pdfnishadvtky
 
Prove or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdf
Prove or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdfProve or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdf
Prove or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdfnishadvtky
 

More from nishadvtky (20)

You are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdfYou are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdf
 
Describe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdfDescribe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdf
 
Why do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdfWhy do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdf
 
Which of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdfWhich of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdf
 
Which system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdfWhich system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdf
 
Which of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdfWhich of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdf
 
Using Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdfUsing Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdf
 
what are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdfwhat are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdf
 
What are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdfWhat are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdf
 
What are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdfWhat are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdf
 
Three kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdfThree kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdf
 
There are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdfThere are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdf
 
The parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdf
The parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdfThe parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdf
The parasitoid wasp, Leptopilina heterotoma, injects eggs into young .pdf
 
The following table lists the etiologies (cause) of illness associate.pdf
The following table lists the etiologies (cause) of illness associate.pdfThe following table lists the etiologies (cause) of illness associate.pdf
The following table lists the etiologies (cause) of illness associate.pdf
 
The color of the neutrophils cytoplasm is a very () pink or blue .pdf
The color of the neutrophils cytoplasm is a very () pink or blue .pdfThe color of the neutrophils cytoplasm is a very () pink or blue .pdf
The color of the neutrophils cytoplasm is a very () pink or blue .pdf
 
Thank you Let X and Y have the joint p.m.f. given by Find the margi.pdf
Thank you Let X and Y have the joint p.m.f. given by  Find the margi.pdfThank you Let X and Y have the joint p.m.f. given by  Find the margi.pdf
Thank you Let X and Y have the joint p.m.f. given by Find the margi.pdf
 
State with reason if the following signals are periodic. If periodic,.pdf
State with reason if the following signals are periodic. If periodic,.pdfState with reason if the following signals are periodic. If periodic,.pdf
State with reason if the following signals are periodic. If periodic,.pdf
 
Shown in the diagram is a simple biochemical pathway. The substrates.pdf
Shown in the diagram is a simple biochemical pathway. The substrates.pdfShown in the diagram is a simple biochemical pathway. The substrates.pdf
Shown in the diagram is a simple biochemical pathway. The substrates.pdf
 
Select a recent Internet scandaleventnews media happening. Describ.pdf
Select a recent Internet scandaleventnews media happening. Describ.pdfSelect a recent Internet scandaleventnews media happening. Describ.pdf
Select a recent Internet scandaleventnews media happening. Describ.pdf
 
Prove or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdf
Prove or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdfProve or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdf
Prove or disprove (Recall Can use Direct Proofs, Contrapositive, Con.pdf
 

Recently uploaded

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 

Recently uploaded (20)

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 

What is an interface How is extending a class different from impl.pdf

  • 1. What is an interface ? How is extending a class different from implementing an interface ? Solution Interface :- Interface is also one type class; it is a fully un-implemented class. It is used for creating a new type of object only by declaring set of operations of this object. So interface contains only public static final variables and public abstract methods for declaring object operations. Interface is mainly introduced to develop multiple implementation inheritance. How is extending a class different from implementing an interface ? Because a class can extend an another class. But one and only a class implements an interface. Example :- Interface I1 { } Interface I2 { } class A { } class c extends A { } class c extends A implements I1,I2 { }