January 21, 201610 yr If you dare to play save all your work first. Run the following and report back the last number you see. Highest number wins. Mine was 50585. public class NumberGameOfDeath { private static Object s = new Object(); private static int count = 0; public static void main(String[] argv) { for (; ; ) { new Thread(new Runnable() { public void run() { synchronized (s) { count += 1; System.err.println("New thread #" + count); } for (; ; ) { try { Thread.sleep(1000); } catch (Exception e) { System.err.println(e); } } } }).start(); } } } If you don't know how to run it. Then go learn it bitch. Take a picture of it if you can. Edited January 21, 201610 yr by Th3
Create an account or sign in to comment