SingltonJAVA

This commit is contained in:
2024-09-25 16:44:47 -04:00
parent 9d5ed95bf7
commit d6d3ccd4df
16 changed files with 142 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
package SingletonClasses;
public class MultiThreads {
public static void main(String[] args) {
Runnable tast = () -> {
LogManagement.FuncLog().Logs();
};
Thread thread1 = new Thread(tast);
Thread thread2 = new Thread(tast);
Thread thread3 = new Thread(tast);
Thread thread4 = new Thread(tast);
Thread thread5 = new Thread(tast);
Thread thread6 = new Thread(tast);
thread1.start();
thread2.start();
thread3.start();
thread4.start();
thread5.start();
thread6.start();
try{
thread1.join();
thread2.join();
thread3.join();
thread4.join();
thread5.join();
thread6.join();
}catch (InterruptedException e){
e.printStackTrace();
}
}
}