Questions:
1. a)Describe producer-consumer pattern using inter-thread communication
b) Write a program that creates two threads using Runnable interface. Fist thread prints the Numbers from 1 to 100 and the other thread prints the numbers from 100 to 1.
c) Does Java support thread priorities? Justify your answer with suitable discussion
2. a) How to achieve synchronization among threads? Write suitable code.
b) How is an Exception handled in JAVA? Differentiate between Checked and Unchecked Exceptions with examples.
c) Java program explain user-defined exception handling.
3. a)What are similarities and difference between
i. Array List and Vector
ii. Iterator and ListIterator
iii. HashList and HashMap
iv. Set and List
b) List the methods of Stack class.
4 a) List and explain different types of Layout managers with suitable examples
b) Explain delegation event model.
c) What are the different types of Event listeners supported by java
5 a) what are the various components of Swing? Explain.
b) Write a program to demonstrate various keyboard events with suitable functionality.
c) Explain the life cycle of Applet and Write the applets to draw the Cube, circle and
Cylinder shapes
0 Comments