The following source code demonstrates a Bank Operations using Threads in Java.

The demo uses Bank, Clerk and Account and Transaction objects to complete the operation. Actually this demo shows how you can use threads to perform the tasks in their own capacity and utilize the maximum system resources. What we do is, we have two clerks and they will do the work separately from each other hence they will work faster using threads. Clerk class implements Runnable interface so that its object will be a thread.