Skip to content

Instantly share code, notes, and snippets.

@orekyuu
Created December 31, 2014 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orekyuu/ca569e67b27cb8e837fd to your computer and use it in GitHub Desktop.
Save orekyuu/ca569e67b27cb8e837fd to your computer and use it in GitHub Desktop.
書き初め
/**
* 2015年書き初め
* 噂のセミコロンレスJavaにチャレンジ
*/
public class Main {
public static void main(String[] args) {
if (java.util.stream.IntStream.range(0, 2016)
.mapToObj(i -> (i % 3 == 0 && i % 5 == 0) ? "FizzBuzz" : ((i % 3 == 0) ? "Fizz" : (i % 5 == 0 ? "Buzz" : String.valueOf(i))))
.peek(System.out::println).allMatch(i -> true)){}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment