a) Write a program to create and use java package. b) Define thread. Explain the life cycle of thread.
Marks: 10Chapter: Unit 7: Threads (3Hrs)
Comprehensive questions and detailed answers for Unit 7: Threads (3Hrs). Perfect for exam preparation and concept clarity.
a) Write a program to create and use java package.
b) Define thread. Explain the life cycle of thread.
What is multithreading? Explain with program how you will create thread by implementing runnable interface and extending Thread class.
What is multithreading? How does Java support inter-thread communication? Explain with example.