Java Assignment 2 Ques ons
All students must submit hardcopy of your assignments on 19-06-2024
Wednesday only. No early or late submission devia ons with the above date is
allowed strictly.
1. Assignment should be hand wri en neatly and legibly on both sides of A4
sides.
2. Front page of assignment should specify your name, rollno and
sec on/branch. Margins and border in all sheets.
3. Please refer prescribed text books/ other resources read and understand the
concepts before you start wri ng the answers.
1. What are the different ways that are possible to create mul ple threaded programs in java?
Discuss the differences between them.
2. What is synchroniza on and why is it important? Explain the methods of achieving
synchroniza on in Java.
3. Write a Java program to handle producer-consumer problem using inter thread
communica on mechanism.
4. Summarize the differences between thread-based mul tasking and process-based
mul tasking.
5. Write a short note on thread life cycle and discuss about thread-based mul tasking.
6. Differen ate between Checked and Unchecked Excep ons with examples.
7. List and explain different types of Layout managers with suitable examples.
8. Write a program to create a frame window that responds to mouse clicks
9. List and explain the limita ons of [Link] the different types of Event
Listeners supported by java.
10. What is an applet? Explain the life cycle of Applet with a neat sketch
11. What is the difference between init( ) and start ( ) methods in an Applet? When will each
be executed?
12. What is a Swing? Explain the Component Hierarchy of Swings.
13. With the help of a neat diagram, explain the swing architecture.
14. How the events of the mouse and keyboard can be handled? Explain with an example.
15. What are the various components of Swing? Explain