MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vda9j/deleted_by_user/cern3xm/?context=3
r/ProgrammerHumor • u/[deleted] • Jan 16 '14
[removed]
446 comments sorted by
View all comments
Show parent comment
1
I wanted to see how efficiently it can be done in Java and came across this. So complicated for such a simple problem lol.
public String fizzBuzz(int n){ return (n>0) ? fizzBuzz(n-1) + (n % 15 != 0? n % 5 != 0? n % 3 != 0? (n+"") :"Fizz" : "Buzz" : "FizzBuzz"): ""; }
View all comments
Show parent comment
1
u/acfman17 Jan 17 '14
I wanted to see how efficiently it can be done in Java and came across this. So complicated for such a simple problem lol.