You should fill in the blank in the following code with ______________.

public class Test {
public static void main(String[] args) {
System.out.print("The grade is ");
printGrade(78.5);

System.out.print("The grade is ");
printGrade(59.5);
}

public static __________ printGrade(double score) {
if (score >= 90.0) {
System.out.println('A');
}
else if (score >= 80.0) {
System.out.println('B');
}
else if (score >= 70.0) {
System.out.println('C');
}
else if (score >= 60.0) {
System.out.println('D');
}
else {
System.out.println('F');
}
}
}


a. int
b. double
c. boolean
d. char
e. void

e void should here because the method does not return any value.

Computer Science & Information Technology

You might also like to view...

A key can be a(n) ________ key that is nonnaturally occurring data that is visible to the user, such as sequential numbering from the AutoNumber data type

Fill in the blank(s) with correct word

Computer Science & Information Technology

Informational text that displays when you point to commands or thumbnails on the Ribbon

A) Shortcut menu B) ScreenTip C) Live Preview

Computer Science & Information Technology