172k views
3 votes
What is wrong with the following code? publicstatic char grade(int score) { if (score >= 9) { return 'A'; } else if (score >= 8) { return 'B'; } else if (score >= 6) { return 'C'; } else if (score > 4) { return 'D'; } else if (score < 4) { return 'F'; } }

1 Answer

4 votes

Answer:

c) No return statement for all possible logic paths

User GRZa
by
3.3k points