Skip to content

Commit

Permalink
DEeeeeeemooooooneeeeesssssss
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodnessAF committed Apr 26, 2024
1 parent 1dec051 commit 6903215
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.quadient.internship.artur.threads;

public class ProgrammStrang1 implements Runnable {

@Override
public void run() {
for (int i = 0; i <= 10000; i++) {
System.out.println("Strang1: " + i);
}
System.out.println("Strang2:v ");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.quadient.internship.artur.threads;

public class ProgrammStrang2 implements Runnable {

@Override
public void run() {
for (int i = 0; i <= 10000; i++) {
System.out.println("Strang2: " + i);
}
System.out.println("Strang2: v");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

public class ThreadsMain {
public static void main(final String[] args) {
System.err.println("Hallo Welt!");
Runnable ps1 = new ProgrammStrang1();
ProgrammStrang2 ps2 = new ProgrammStrang2();
Thread thread1 = new Thread(ps1);
Thread thread2 = new Thread(ps2);

thread1.setDaemon(false);
thread2.setDaemon(true);

thread1.start();
thread2.start();
}
}

0 comments on commit 6903215

Please sign in to comment.