SRI KRISHNA INSTITUTE OF TECHNOLOGY
(Accredited by NAAC, Approved by A.I.C.T.E. New Delhi, Recognised by Govt. of Karnataka & Affiliated to V.T U., Belagavi)
#29, Chimney Hills, Hesaraghatta Main Road, Chikkabanavara Post, Bengaluru- 560090
Department of Artificial Intelligence and Machine Learning
Subject Name: Object oriented programming with JAVA Subject Code: BCS306A
SEM: III DIV: A
Faculty: Mr. Amar Sri.A
Module-1 Question Bank
SL# Question CO Level Marks
1. Explain object oriented principles. CO1 L2 7
2. Describe the meaning of each of the keyword in “public static void CO1 L1 7
main” and write an example program.
3. Explain different lexical issues in JAVA. CO1 L2 8
4. Explain different types of arrays with simple program. CO1 L1 7
5. Explain different promotion rules in JAVA. CO1 L2 7
6. Explain the following operations with example. CO1 L2 8
(i)<< (ii)>> (iii)>>> (iv)&
7. Demonstrate the working of enhanced for loop with an example CO1 L2 7
program.
8. Write a program to sort the elements using for loop. CO1 L3 7
9. Explain four different types of if statements in JAVA with CO1 L2 8
example.
10. Demonstrate working of break with labels in JAVA CO1 L2 7
11. CO1 L2 7
Discuss different versions of for-loop with examples.
12. Write a program to illustrate break statement with labels CO1 L2 7
Module-2 Question Bank
SL# Question CO Level Marks
1. What are constructors? Explain two types of constructors with C02 L3 8
example.
2. Explain static variable and static methods in JAVA. CO2 L2 7
3. Write a program to perform Stack operation using proper class CO2 L2 7
and
Methods.
4. Explain use of this in JAVA with example program. CO2 L3 8
5. Explain memory allocation and use of garbage collector in JAVA. CO2 L3 8
6. Write a JAVA program demonstrating Method overloading. CO2 L2 7
7. Explain call by value and call by reference with example program. CO2 L2 8
8. Explain nested and inner classes. CO2 L2 8
9. Distinguish between method overloading and method overriding. CO2 L3 8
SRI KRISHNA INSTITUTE OF TECHNOLOGY
(Accredited by NAAC, Approved by A.I.C.T.E. New Delhi, Recognised by Govt. of Karnataka & Affiliated to V.T U., Belagavi)
#29, Chimney Hills, Hesaraghatta Main Road, Chikkabanavara Post, Bengaluru- 560090
10. How do you overload a constructor? Explain with a program. CO2 L3 8
11. CO2 L2 8
Define recursion. Write a recursive program to find nth Fibonacci
number.
12. What are various access specifiers in Java? List out the behaviour CO2 L2 7
of each of them.
Module-3 Question Bank
SL# Question CO Level Marks
1. Which are the restrictions present for static declared methods? CO3 L2,L3 8
2. Explain how interface is used to achieve multiple Inheritances in CO3 L3 7
Java.
3. Write a java program to implement multilevel inheritance with 3 CO3 L3 8
levels of hierarchy.
4. Write a java program to extend interface assuming suitable data. CO3 L3 8
5. What is single level inheritance? Explain with suitable example. CO3 L3 7
6. What is meant by interface? State its need and write syntax and CO3 L3 7
features of interface.
7. Explain inheritance and polymorphism features of Java. CO3 L3 8
8. Explain method overriding with suitable example. CO3 L3 7
9. What is importance of super keyword in inheritance? Illustrate with CO3 L3 7
suitable example.
10. Write a single program to implement inheritance and polymorphism in CO3 L3 8
java.
11. Explain concept of nesting of interface. CO3 L3 7
12. What is abstract class and abstract method? Explain with example. CO3 L3 7
Module-4 Question Bank
SL# Question CO Level Marks
1. Which are the ways to access package from another package? Explain CO4 L2 8
with example.
2. How to add new class to a package? Explain with an example. CO4 L2 8
3. What is package? How do we create it? Give the example to create CO4 L2 8
and to access package.
4. What do you mean by a package? How do you use it in a Java CO4 L2 8
program? Explain with a program.
5. How do you import a package? Explain. CO4 L2 7
6. Write a note on access protection in Java. CO4 L2 8
7. Define an interface. Explain how to define and implement an CO4 L3 8
interface with an example.
8. Differentiate abstract base class and an interface. CO4 L2 8
SRI KRISHNA INSTITUTE OF TECHNOLOGY
(Accredited by NAAC, Approved by A.I.C.T.E. New Delhi, Recognised by Govt. of Karnataka & Affiliated to V.T U., Belagavi)
#29, Chimney Hills, Hesaraghatta Main Road, Chikkabanavara Post, Bengaluru- 560090
9. How do you define variables inside interface? List out the CO4 L2 6
characteristics of such variables.
10. Define an exception. What are the key terms used in exception CO4 L2 8
handling? Explain.
11. Demonstrate working of nested try block with an example. CO4 L2 8
12. Write a program which contains one method which will throw CO4 L3 8
Illegal Access Exception and use proper exception handles so that
exception should be printed.
13. Write a note on: CO4 L2 8
Java’s built-in exception
Uncaught Exceptions
14. How do you create your own exception class? Explain with a CO4 L3 7
program.
Module-5 Question Bank
SL# Question CO Level Marks
1. Define Enumerations. Give an example. CO5 L2 8
2. Discuss values() and value Of() methods in Enumerations with CO5 L2 8
suitable examples.
3. "Enumerations in Java are class types"-justify this statement with CO5 L2 8
appropriate examples.
4. Write a note on ordinal() and compare To() methods. CO5 L2 8
5. What are wrapper classes? Explain with examples. CO5 L2 8
6. Explain auto boxing /unboxing in expressions. CO5 L2 8
7. What is multithreading? Write a program to create multiple threads CO5 L2 8
in JAVA
8. What do you mean by thread? Explain the different ways of CO5 L2 8
creating threads.
9. Write a JAVA program to create two threads, one displays CO5 L3 8
"computer science" and another displays "information science" five
times.
10. With syntax, explain use Of is Alive( ) and join( ) methods. CO5 L2 8
11. What is the need of synchronization? Explain with an example how CO5 L2 8
synchronization is implemented in JAVA.
12. Explain with an example how inter thread communication is CO5 L2 8
implemented in JAVA
13. What is meant by thread priority? How to assign and get the thread CO5 L2 8
priority?
14. Explain how to achieve suspending, resuming and stopping threads CO5 L3 8
with an example program.
Faculty Signature