Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainZoo {
- public static void main(String[] args) {
- Pasillo pasillo = new Pasillo();
- Random random = new Random();
- int id = 1;
- while (true) {
- Persona p = new Persona(id++, pasillo);
- p.start();
- try {
- int arrivalTime=random.nextInt(101) + 100;
- Thread.sleep(arrivalTime);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment