I wrote this simple solution about FizzBuzz. Is there any possible way to solve or optimize the solution, such as with bitwise tricks?public class FizzBuzz{  public static void main(String[] args){    for(int i = 1 ; i <= 100 ; ++i){      if(i % (5*3) == 0){        System.out.println(FizzBuzz);      }else if(i % 3 == 0){        System.out.println(Fizz);      }else if(i % 5 == 0){        System.out.println(Buzz);      }else        System.out.println(i);    }  }}
FizzBuzz Problem Solution
java;fizzbuzz
I like this. if(i % (5*3) == 0){Most people would have used 15 which I believe to be wrong. The way you've done it, it's clear that the first case is a multiple of the other two cases. Well done!They are magic numbers though, and should be replaced with meaningful constants. Otherwise, I wouldn't change another thing. (Disclaimer: Someone will come behind me and talk about ways to make the code more efficient, but none of them will be as readable as this algorithm.)