package veterinarian; import java.util.ArrayList; import java.util.Random; public class Main { public static void main(String[] args) throws Exception { Random r = new Random(); int r_int; String animal_s; WaitingRoom wr = new WaitingRoom(); ArrayList<Thread> threads = new ArrayList<Thread>(); for (int i=0; i<10; i++) { r_int = r.nextInt(2); if(r_int == 0) { animal_s = "cat"; } else { animal_s = "dog"; } AnimalThread at = new AnimalThread(wr, animal_s, r, i); threads.add(at); } for (Thread t: threads) { t.start(); } } }