class Fork { private int me; String id () { return "Fork-" + me; } private boolean taken; Fork (int m) { me = m; taken = false; } synchronized void drop (Philo p) { .. } synchronized void take (Philo p) { .. } }