replaced threadId() with Thread.currentThread().getName()
parent
fad4d1925e
commit
e3154b714d
|
@ -97,7 +97,7 @@ public class Philosopher extends Thread implements IPhilosopher {
|
|||
for (var i = 1; i <= this.seat; i++) {
|
||||
System.out.print(" ");
|
||||
}
|
||||
System.out.println(threadId() + " " + message);
|
||||
System.out.println(Thread.currentThread().getName() + " " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue