1. Learn
  2. /
  3. Courses
  4. /
  5. Optimizing Code in Java

Connected

Exercise

Creating parallel threads for processing

You're developing a financial analysis application that needs to process a large number of transactions. Each transaction requires CPU-intensive calculations. The application currently uses a sequential approach, but it's too slow. You are tasked with implementing a multi-threaded solution to improve the performance.

The Transaction class was preloaded for you.

Instructions

100 XP
  • Create Threads that will run processTransaction().
  • Start all threads.
  • Wait for all threads to complete.