Basically, I am doing a java program for school. The checkstyle program we are required to use is saying that I am not simplifying my if statement enough. Is there a better way to do this?
My code:
if (check() == true)
{
return amount * 0.85;
}
else
{
return amount;
}
Aucun commentaire:
Enregistrer un commentaire