Computer Science, asked by sherry98th, 2 months ago

Create an int array of size 100. Then create 5 threads which can generate random int number for that array make sure threads are synchronized. After that create 5 different threads which will take 20 elements in sequence from that array and process them if a number is prime then raise and exception and replace that prime number with non-prime number.

Answers

Answered by Anonymous
2

Answer:

Create an int array of size 100. Then create 5 threads which can generate random int number for that array make sure threads are synchronized. After that create 5 different threads which will take 20 elements in sequence from that array and process them if a number is prime then raise and exception and replace that prime number with non-prime number

Explanation:

Hopes it helps you

Similar questions