import java.util.Arrays; import java.util.Random; public class Exercise3 { public static Random random = new Random(); public static void main(String[] args) throws InterruptedException { final Account[] accounts = new Account[10]; for(int i = 0; i < accounts.length; i++) { accounts[i] = new Account(); } Thread[] tests = new Thread[5]; //start some tests for our banking system for(int i = 0; i < tests.length; i++) { tests[i] = new BankingTest(accounts); tests[i].start(); } for(int i = 0; i < tests.length; i++) { tests[i].join(); } //print some statistics System.out.println(Arrays.toString(accounts)); } }