All of you know the trivial fizzbuzz question during the first junior interviews. In my case, it was more than write a solution. There were more requirements: Only two ifelse statements. StringBuilder required. No Map, Collection. No ternary operator. Only Java core (8 or 11). You have only 5 minutes (in my case, but for you it doesn’t matter). My
Tag: fizzbuzz
Variable inside array not updating its value in Java
I was taking a shot at the FizzBuzz problem and decided to use an array to store the first 15 results in array and then iterate through it. But the variable stored in array is not updating its value if updated later in the loop The variable I does not change its value in the for-loop. It just prints empty