UNIT TEST QUESTIONS – Exception Handling & Multithreading (Each question carries 5
marks)
SECTION A – Exception Handling
1. Explain the difference between checked and unchecked exceptions in Java. Give two examples
of each and describe when they occur.
2. Write a Java program to demonstrate the use of try, catch, finally blocks. Explain the role of each
block in exception handling.
3. What is custom exception? Write the steps to create a user-defined exception class and provide
an example where it is used.
4. Explain exception propagation with an example. How does the JVM handle uncaught
exceptions?
5. What is the difference between throw and throws? Explain with syntax and examples where each
is used.
SECTION B – Multithreading
6. What is the difference between Thread class and Runnable interface? Write a program using
Runnable to create two threads.
7. Explain the thread life cycle with a neat labelled diagram. Describe each state briefly.
8. What is synchronization in Java? Explain why it is needed and demonstrate method-level
synchronization with a program.
9. Explain inter-thread communication using wait(), notify(), and notifyAll(). Provide a simple
example.
10. Write a Java program to create a multithreaded application where three threads print numbers
in sequence (1–10). Explain how thread scheduling affects your output.