Fizzy
by in CodeSOD on 2022-06-30Suri was about to add some new functionality to an existing application, and since it was a relatively big change, she spent a few hours tidying up the codebase. Sitting in there, in the code actually running in production, she found this:
/**
* The VehicleConfigurationModel class.
*/
public class VehicleConfigurationModel {
public static void main(String[] args) {
for (int counter = 0; counter <= 20; counter++) {
if(counter % 3 == 0){
System.out.print("Fizz");
}
if (counter % 5 == 0){
System.out.print("Buzz");
} else {
System.out.print(counter);
}
System.out.println("");
}
}
}