Solved

What Is Wrong with the Following Code

Question 47

Multiple Choice

What is wrong with the following code?
Public static String 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;
}
Return F;
}


A) Illegal method name
B) Invalid parameter variable type
C) No return statement for all branches of "if" statement
D) Invalid argument in return statements

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents