replaced threadId() with Thread.currentThread().getName()

main
Emelie Schneider 2024-10-28 19:22:36 +01:00
parent fad4d1925e
commit e3154b714d
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}
}