0% found this document useful (0 votes)
13 views1 page

08 MultiThreading

The document outlines a multi-threading assignment consisting of various programming tasks in Java. These tasks include creating a question-answer program, a file watcher class, demonstrating thread methods, and implementing producer-consumer synchronization. Additionally, it covers topics like deadlock situations and automatic file creation and deletion.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

08 MultiThreading

The document outlines a multi-threading assignment consisting of various programming tasks in Java. These tasks include creating a question-answer program, a file watcher class, demonstrating thread methods, and implementing producer-consumer synchronization. Additionally, it covers topics like deadlock situations and automatic file creation and deletion.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

08.

MultiThreading – Assignment

1. Write a program that picks up a question from an array containing 10 elements


and displays the question. It then waits 30 seconds for the user to answer. If user
answers it correctly, then it moves to the next question otherwise terminates the
program.

2. Write a java program to create a class called FileWatcher that can be given
several filenames that may or may not exist. The class should start a thread for
each file name. Each thread will periodically check for the existence of its file. If
the file exists, the thread will write a message to the console and then end.

3. Write a java program to create a class called FileWatcher that can be given
several filenames that may or may not exist. The class should start a thread for
each file name. Each thread will periodically check for the existence of its file. If
the file exists, the thread will write a message to the console and then end.

4. Automatically create and delete a file(set timer)

5. Write a Java program which demonstrates join() method of a Thread class

6. Write a program where the Producer pushes the elements into the stack and the
Consumer pops the elements from the stack. Use Synchronization.

7. Write a Java Program which demonstrates Producer Consumer in Synchronization


for a Bank Account where the joint customers are doing withdraw operations (Use
wait() and notify() methods).

8. Write a Java Program which demonstrates Deadlock situation

9. Write a program which demonstrates the methods present in Thread class.

Nexwave Assignments Page 1 of 1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy