I've met all the criteria. If a < 5, displays less than 5. Else displays number is greater than 5. Instructions say nothing about whether or not number is actually 5, as is the case with the third call of the compare method. I can fix this with an "else if" but I'm not specifically asked to. These tasks are so vague with what they expect sometimes but don't state. Thanks.
package en.codegym.task.jdk13.task04.task0408;
/*
Good or bad?
*/
public class Solution {
public static void main(String[] args) {
compare(3);
compare(6);
compare(5);
}
public static void compare(int a) {
if (a < 5)
{
System.out.println("The number is less than 5.");
}
else
{
System.out.println("The number is greater than 5.");
}
}
}