// The tweet that started it all: https://twitter.com/nilsding/status/740241674597761024

public class HelperMethods {

    public static boolean isTrue(boolean bool) {
        if (Boolean.toString(bool).length() == 4) {
            return new Object() instanceof Object;
        } else if (Boolean.toString(bool).length() == 5) {
            return !isTrue(1 == 1);
        } else {
            return false;
        }
    }
    
    private static class ExampleObject extends Object {
        @Override
        public int hashCode() {
            return 423874;
        }
    }
    
    public static boolean isObject(Object o) {
        if (o.hashCode() == 423874) {
            return true;
        } else if (isTrue(o instanceof Object)) {
            return isObject(new ExampleObject());
        } else {
            return false;
        }
    }
    
    public static boolean isNull(Object o) {
        try {
            o.toString();
        } catch (NullPointerException e) {
            o = "This object was null.";
            return !isNull(o);
        }
        return isTrue("This object is not null".length() <3);
    }
    
    public static boolean willThisProgramStop() {
        while (isTrue(true)) {}
        return true;
    }
    
    public static boolean willThisProgramRunForever() {
        return !willThisProgramStop();
    }
    
}

@@ -83,16 +83,118 @@
 761024%0A%0A
+import java.util.concurrent.atomic.AtomicInteger;%0Aimport java.util.List;%0Aimport java.util.ArrayList;%0A%0A
 public c
@@ -1457,10 +1457,879 @@
  %7D%0A    %0A
+    public static int%5B%5D sleepSort(int... args) %7B%0A        final int%5B%5D sorted = new int%5Bargs.length%5D;%0A        final AtomicInteger index = new AtomicInteger(0);%0A        List%3CThread%3E threads = new ArrayList%3CThread%3E(0);%0A        for (int i = 0; i %3C args.length; i++) %7B%0A            final int x = i;%0A            Thread sorter = new Thread(() -%3E %7B%0A                try %7B%0A                    Thread.sleep(args%5Bx%5D);%0A                %7D catch (InterruptedException ex) %7B%0A                        // shrug%0A                %7D%0A                sorted%5Bindex.getAndIncrement()%5D = args%5Bx%5D;%0A            %7D);%0A            sorter.setDaemon(true);%0A            sorter.start();%0A            threads.add(sorter);%0A        %7D%0A        try %7B%0A            for (Thread t : threads) %7B t.join(); %7D%0A        %7D catch (InterruptedException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return sorted;%0A    %7D%0A
 %7D%0A

Add sleepsort (#15)