Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    public static void main(String[] args) {
  2.        final int[] i = new int[]{0};
  3.  
  4.        for ($(() -> {
  5.            i[0] = 0;
  6.        }); $$(() -> {
  7.            // Code here
  8.            return i[0] < 10;
  9.        }); $(() -> {
  10.            // Or here
  11.            i[0]++;
  12.        })) {
  13.            // Or even here!
  14.        }
  15.    }
  16.  
  17.    private static final void $(Runnable runnable) {
  18.        runnable.run();
  19.    }
  20.  
  21.    private static final boolean $$(Supplier<Boolean> supplier) {
  22.        return supplier.get();
  23.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement