SlideShare a Scribd company logo
1 of 1
Chapter 3. Interface and Package
4 Marks
1. Design a package containing a class which defines a method to find area of
rectangle. Import it in Java application to calculate area of a rectangle.
2. State any four system packages along with their use.
3. Write the effect of access specifiers public, private and protected in package.
4. What is package? How do we create it?
5. Write a program to implement following:
6. With example explain in brief new interface can be used for multiple inheritance
6 Marks
1. Write syntax of defining interface. Write any major two differences between
interface and a class.
2. What is package? How to create package? Explain with suitable example.
3. Write impact of access specifiers public, private and protected on packages in
java.
8 Marks
1. What is meant by an interface? State its need and write syntax and features of an
interface. Give one example.
2. Explain with example how to achieve multiple inheritance with interface.
3. What is package? State any four system packages along with their use?
4. How to add class to a user defined package?
5. What is interface? How it is different from class? With suitable program explain
the use of interface.
6. What is meant by an interface? State its need and write syntax and features of an
interface.

More Related Content

Similar to chapter-3-interface-and-package.docx

Z blue interfaces and packages (37129912)
Z blue   interfaces and  packages (37129912)Z blue   interfaces and  packages (37129912)
Z blue interfaces and packages (37129912)
Narayana Swamy
 

Similar to chapter-3-interface-and-package.docx (20)

Packages and interfaces
Packages and interfacesPackages and interfaces
Packages and interfaces
 
Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & Answers
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
C#
C#C#
C#
 
Top 10 Interview Questions For Java
Top 10 Interview Questions For JavaTop 10 Interview Questions For Java
Top 10 Interview Questions For Java
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
 
Z blue interfaces and packages (37129912)
Z blue   interfaces and  packages (37129912)Z blue   interfaces and  packages (37129912)
Z blue interfaces and packages (37129912)
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
Java - Interfaces & Packages
Java - Interfaces & PackagesJava - Interfaces & Packages
Java - Interfaces & Packages
 
Lab13
Lab13Lab13
Lab13
 
Packages access protection, importing packages
Packages   access protection, importing packagesPackages   access protection, importing packages
Packages access protection, importing packages
 
Mit103 object oriented programming
Mit103  object oriented programmingMit103  object oriented programming
Mit103 object oriented programming
 
Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Intro to programing with java-lecture 1
Intro to programing with java-lecture 1
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developers
 
java interface and packages
java interface and packagesjava interface and packages
java interface and packages
 
Reoprt on indutrial training
Reoprt on indutrial trainingReoprt on indutrial training
Reoprt on indutrial training
 
1
11
1
 
PACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in java
PACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in javaPACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in java
PACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in java
 
Probable questions for semester exam
Probable questions for semester examProbable questions for semester exam
Probable questions for semester exam
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
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
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 

chapter-3-interface-and-package.docx

  • 1. Chapter 3. Interface and Package 4 Marks 1. Design a package containing a class which defines a method to find area of rectangle. Import it in Java application to calculate area of a rectangle. 2. State any four system packages along with their use. 3. Write the effect of access specifiers public, private and protected in package. 4. What is package? How do we create it? 5. Write a program to implement following: 6. With example explain in brief new interface can be used for multiple inheritance 6 Marks 1. Write syntax of defining interface. Write any major two differences between interface and a class. 2. What is package? How to create package? Explain with suitable example. 3. Write impact of access specifiers public, private and protected on packages in java. 8 Marks 1. What is meant by an interface? State its need and write syntax and features of an interface. Give one example. 2. Explain with example how to achieve multiple inheritance with interface. 3. What is package? State any four system packages along with their use? 4. How to add class to a user defined package? 5. What is interface? How it is different from class? With suitable program explain the use of interface. 6. What is meant by an interface? State its need and write syntax and features of an interface.