Wednesday, August 10, 2022

Object Oriented Concepts : Module 4

  1. What is multithreading? Explain any two uses of multithreaded programs.
  2. Write a Java program to implement a producer-consumer problem using threads.
  3. Explain the mechanism of event delegation model. Give an example for using keyboard event.
  4. What is multithreading? Write a program to create multiple threads in Java.
  5. Discuss the significance of synchronization in Java.
  6. Briefly explain the role of :  a. ActionEvent class b. AdjustmentEvent class
  7. With syntax, explain the use of isAlive() and join() methods.
  8. How synchronization can be achieved for threads in Java? Explain with syntax.
  9. Enlist the different methods in WindowListener. What is the use of WindowAdaptor?
  10. Write a program in applet which will print “key pressed” on the status window when you press the key, “key released” on the status window when you release the key and when you type the characters it should print “Hello” at coordinates (50,50) on applet.
  11. What is meant by thread priority? How it is assigned?
  12. Explain the adaptor classes with examples.
  13. Provide Java syntax for the following:  
a. Making class threadable. 
b. Extending thread. 
c. Synchronization  
d. Catching interrupt
    14. Write a Java program which creates two threads, one thread displays “VTU-Belgaum” for every 100 seconds, and another thread displays “Karnataka” for every 50 seconds continuously.
    15..Define the delegation event model. Briefly explain the role of
    a. Event classes
    b. Event listener interfaces
    c. Sources of events
    d. Adaptor classes

16. Describe the various levels of access protections available for packages and their implications.

17. Define package. What are the steps involved in creating user defined package with an example.

18. Explain how variables in interfaces are used.  

No comments:

Post a Comment

Database Management systems - Module 2

1 a. Explain the entity integrity and referential integrity constraints.   Why is each considered important. Give examples.    b. Discuss eq...