Question Bank2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Object Oriented Programming with JAVA

Package and Interfaces


1. What do you mean by a package? How do you use it in a Java program? Explain with a program.
2. How do you import a package? Explain.
3. Write a note on access protection in Java.
4. Define an interface. Explain how to define and implement an interface with an example.
5. Differentiate abstract base class and an interface.
6. How do you define variables inside interface? List out the the characteristics of such variables.

Exceptions
1. Define an exception. What are the key terms used in exception handling? Explain with
suitable example.
2. List various types of exceptions. Provide java examples where each type of exception is
appropriate.
3. Explain the structure and purpose of the try-catch-finally blocks in Java exception
handling.
4. Discuss the significance of the 'finally' block in exception handling.
5. How do you create your own exception class? Explain with a program.
6. Explain the concept of chained exceptions in Java with suitable example.
7. Demonstrate working of nested try block with an example.
8. Write a note on:
a. Java’s built-in exception
b. Uncaught Exceptions

Thread Creation and Main Thread


1. Explain significance of the main thread in Java. Discuss how it coordinates the execution of
other threads in a Java program.
2. With state daigram explain lifecycle stages of a thread
3. Explain how threads communicate and coordinate with each other using methods like wait(),
notify(), and notifyAll(). Analyze scenarios where these methods are used effectively.
4. With code snippet explain producer consumer application using notify() and wait() methods.

Prepare Lab questions 04 to 08 for IA02

Note : Questions in IA02 need not be limited to this question bank

You might also like