From e3154b714d1d6b231a629be5cc63f268e1611060 Mon Sep 17 00:00:00 2001 From: emelie <3010678@stud.hs-mannheim.de> Date: Mon, 28 Oct 2024 19:22:36 +0100 Subject: [PATCH] replaced threadId() with Thread.currentThread().getName() --- pp.A1-CondPhilosophers/src/main/java/pp/Philosopher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp.A1-CondPhilosophers/src/main/java/pp/Philosopher.java b/pp.A1-CondPhilosophers/src/main/java/pp/Philosopher.java index d25af7a..247ec3b 100644 --- a/pp.A1-CondPhilosophers/src/main/java/pp/Philosopher.java +++ b/pp.A1-CondPhilosophers/src/main/java/pp/Philosopher.java @@ -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); } } }