Question: Design a 'heavy' task for your Java app that is divisible into multiple sub-tasks (threads). a) First run the task as part of a SINGLE-THREADED
Design a 'heavy' task for your Java app that is divisible into multiple sub-tasks (threads).
a) First run the task as part of a SINGLE-THREADED app and display the completion time. Make sure that it is heavy enough to take a few seconds to complete
b) Then create and execute a MULTI-THREADED variant of the same app and record the completion time for the same tasks when run over multiple threads.
NOTES:
1) You may choose/design a task of your choice
2) You'll need to record the time both the apps take to complete the same task/operation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
