From 662dbdd0216f7a19eb9b4e613fc6af60c0848615 Mon Sep 17 00:00:00 2001 From: romanschenk37 <84532681+romanschenk37@users.noreply.github.com> Date: Thu, 3 Mar 2022 13:21:49 +0100 Subject: [PATCH] Methode run() in Printer.java erweitert. --- code/Printer/src/main/java/ch/zhaw/prog2/printer/Printer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/Printer/src/main/java/ch/zhaw/prog2/printer/Printer.java b/code/Printer/src/main/java/ch/zhaw/prog2/printer/Printer.java index 8d2be19..f14b654 100644 --- a/code/Printer/src/main/java/ch/zhaw/prog2/printer/Printer.java +++ b/code/Printer/src/main/java/ch/zhaw/prog2/printer/Printer.java @@ -24,6 +24,9 @@ public class Printer { @Override public void run() { + if(Thread.currentThread().getName().equals("main")){ + return; + } System.out.println(getName() + " run started..."); for (int i = 1; i < 100; i++) { System.out.print(symbol);