Skip to content

Instantly share code, notes, and snippets.

@yyYank
Created April 27, 2016 12:16
Show Gist options
  • Save yyYank/883bc66588129c2beda4771376195e0f to your computer and use it in GitHub Desktop.
Save yyYank/883bc66588129c2beda4771376195e0f to your computer and use it in GitHub Desktop.
public class Hello {
public static void main(String... args){
if(java.util.Arrays.stream("H,e,l,l,o, W,o,r,l,d,!".split(",")).peek(System.out::print).count() == 0){}
}
}
@yyYank
Copy link
Author

yyYank commented Apr 27, 2016

Hello World!

@yyYank
Copy link
Author

yyYank commented Apr 27, 2016

もしかしてStream.ofでいいんちゃうか

public class Hello {
    public static void main(String... args){
        if(java.util.stream.Stream.of("Hello World!").peek(System.out::print).count() == 0){}
    }
}

@yyYank
Copy link
Author

yyYank commented Apr 27, 2016

畜生

public class Hello {
    public static void main(String... args){
        if(System.out.printf("Hello World!" + System.lineSeparator()) != null){}
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment