Targets = new Object[numberOfTargets]; for (int i = 0; i < numberOfTargets; i++) { Targets[i] = new Object(); }
synchronized (Targets[targetNumber]) { Targets[targetNumber].notify(); }
synchronized (Targets[targetNumber]) { try { Targets[targetNumber].wait(); } catch (Exception e) {} }