SJM Vidyapeetha®
S. J. M INSTITUTE OF TECHNOLOGY
(Affiliated to Visvesvaraya Technological University, Belagavi, Recognized by AICTE,
New Delhi and Approved by Government of Karnataka)
P.B. No. 73, NH4 By-pass, Chitradurga -577 502, Karnataka State, India.
Department of Computer Science & Engineering
Subject: Object Oriented Programming with Java Semester: 3rd
Subject Code: BCS306A Section: ’A’ &’B’
Module-3 Questions
1. Define inheritance? List and explain the different types of inheritance. Why
multiple inheritance is not supported in java?
2. What is super? Explain the use of super with suitable example.
3.
Difference between method overloading and method overriding in java.
4. With an example program explain the method of overriding .
5. With an example program explain Dynamic Method Dispatch. (Run time
polymorphism)
6. Explain the following with an example.
1. Abstract class in Java.
2. Local Variable type inference
3. The object class
7. What is an interface? Why use Java interface? What are the advantages of
java interface?
8. Develop a JAVA program to create an interface Resizable with methods
resizeWidth(int width) and resizeHeight(int height) that allow an object to be
resized. Create a class Rectangle that implements the Resizable interface and
implements the resize methods. (Lab Program-7)
9. Explain nested interface with an example program.
10. How would you explain the default interface methods with an example
program.
11. Why use static Methods in an Interface? Give one example of static method.
12 Explain private interface methods give an example.
-----------------------------------------------------*****-----------------------------------------------------
Page 1