Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ninja.genuine.brainfuck;
- /**
- * The output of this program is:
- * true
- * false
- * false
- * false
- * true
- * false
- * true
- * true
- * true
- */
- public class BrainFuck {
- public static Something foo = (Something & Foo) v -> {};
- public static Something bar = (Something & Bar) v -> {};
- public static Something fooBar = (Something & Foo & Bar) v -> {};
- public static void main(String[] args) {
- System.out.println(foo instanceof Foo);
- System.out.println(foo instanceof Bar);
- System.out.println(foo instanceof Foo && foo instanceof Bar);
- System.out.println(bar instanceof Foo);
- System.out.println(bar instanceof Bar);
- System.out.println(bar instanceof Foo && bar instanceof Bar);
- System.out.println(fooBar instanceof Foo);
- System.out.println(fooBar instanceof Bar);
- System.out.println(fooBar instanceof Foo && fooBar instanceof Bar);
- }
- public static interface Something {
- void noop(Object o);
- }
- public static interface Foo {}
- public static interface Bar {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement