tag:blogger.com,1999:blog-8712770457197348465.post6364166973675424998..comments2024-03-29T05:54:46.190-07:00Comments on Javarevisited: How to solve FizzBuzz Problem in Java 8? Stream.map() Examplejavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8712770457197348465.post-4624683185720054802015-04-25T04:46:45.529-07:002015-04-25T04:46:45.529-07:00private static Func3 dividableMapping = (n, d, re...private static Func3 dividableMapping = (n, d, result) -> n % d == 0 ? result : "";<br />private static final List> FIZZ_BUZZ_FUNCTIONS = Arrays.asList(<br /> n -> dividableMapping.call(n, 3, "Fizz"),<br /> n -> dividableMapping.call(n, 5, "Buzz"));<br /><br />public static String fizzBuzzInJava8(Integer n) {<br /> String result = TSnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-75539115682693142622015-04-09T13:59:40.065-07:002015-04-09T13:59:40.065-07:00That's a most stupid (mis)use of Optional I ha...That's a most stupid (mis)use of Optional I have ever seen. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-77790294248954622572015-04-03T06:49:42.361-07:002015-04-03T06:49:42.361-07:00As a C/Java developer, I really hate java8 new fea...As a C/Java developer, I really hate java8 new features, beside the FuzzBuzz question is really easy(haven't heard too)!!! even my grandma would be accepted.<br />Java 8 new features were a really big disappointment.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-45320050230895463292015-04-02T22:44:06.165-07:002015-04-02T22:44:06.165-07:00Would be interesting to see the effects of object ...Would be interesting to see the effects of object creation. I feel like the standard solution would be more efficient given a single input at a timeAnonymousnoreply@blogger.com