- 1 Create Threads That Will Perform The Following Thread 1 Writes All Prime Numbers Between 1 And 100 To The File Fil 1 (20.74 KiB) Viewed 49 times
1. Create Threads that will perform the following: Thread 1 - Writes all prime numbers between 1 and 100 to the file fil
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. Create Threads that will perform the following: Thread 1 - Writes all prime numbers between 1 and 100 to the file fil
1. Create Threads that will perform the following: Thread 1 - Writes all prime numbers between 1 and 100 to the file file1.txt Thread2- Writes all prime numbers between 101 and 200 to the file2.txt (Write operations to the files should be paused for 1 second after each write.) Thread3- Reads and displays prime numbers from file1.txt Thread4- Reads and displays prime numbers from file2.txt Thread and Thread4 should start the read operations after the write operations to the file is complete. (Use DataOutputStream and DataInputStream for the file write and read operations)