Fizzbuzz questions - job interview rejected I have done some programming tasks as a part of my candidacy for a web development apprenticeship. Unfortunately, my application was rejected as the hiring manager &quot;didn't like my codes.&quot; I called up their office but no one was able to provide sufficient feedback for me.
If any of you could tell me what I could have misunderstood or what I could have done correctly, I pretty much appreciate it.
The Tasks I worked with
Write a program that shows the numbers from 1 to a specified limit (e.g. 100).
The numbers should be translated as follows: 1. For multiples of 3 return &quot;Fizz&quot; 2. For multiples of 5 return &quot;Buzz&quot; 3. For multiples of 3 and 5 return &quot;FizzBuzz&quot; 4. If none of the other rules apply, return the number itself
Unit tests are optional, but would be a plus.
My Solution
public class FizzBuzz {
    
    //a class *variable*, not a class
    private static int counter;

    //checking if a multiple of 3
    private static boolean isFizz(int i) {
        return i % 3 == 0; //no need for if
    }

    //checking if a multiple of 5
    private static boolean isBuzz(int i) {
        return i % 5 == 0; //no need for if
    }

    public static void main(String[] args) {
        for (int i = 1; i &lt;= 100; i++) {
            System.out.println(i);
            if (i % 5 == 0 &amp;&amp; i % 3 == 0) {
                System.out.println(&quot;FizzBuzz&quot;);
            } else if (i % 3 == 0){
                System.out.println(&quot;Fizz&quot;);
            } else if (i % 5 == 0) {
                System.out.println(&quot;Buzz&quot;);
            } else {
                System.out.println(i);
            }
        }
    }

    @Test public void testFizzBuzz(){
        assertEquals(&quot;fizz&quot;, fizzBuzz(i == 3));
        assertEquals(&quot;buzz&quot;, fizzBuzz(i == 5));
        assertEquals(&quot;fizzbuzz&quot;, fizzBuzz(i == 15));
        assertEquals(&quot;2&quot;, fizzBuzz(i == 2)); 
    }

}
You don't use counter, isFizz() or isBuzz(), testFizzBuzz() calls to a fizzBuzz method which doesn't appear to exist. (Passing a boolean argument which seems illogical).
Your code is formatted well, but the points above mean that a reviewer would doubt your competence.
Have you shown us all your code? If not, why not?
Did you compile, run and test your code? If not, why not?