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 " + getGrade(78.5));
System.out.print("\nThe grade is " + getGrade(59.5));
}
public static _________ getGrade(double score) {
if (score >= 90.0)
return 'A';
else if (score >= 80.0)
return 'B';
else if (score >= 70.0)
return 'C';
else if (score >= 60.0)
return 'D';
else
return 'F';
}
}
a. int
b. double
c. boolean
d. char
e. void
d char should be placed here because the method returns a character.
You might also like to view...
Which of the following represents a network address that all hosts on a network must read?
A. loopback B. hop C. broadcast address D. dot squad
________ effects draw attention to objects already on the slide
Fill in the blank(s) with correct word
A conditional format that displays horizontal gradient or solid fill indicating the cell’s relative value compared to other selected cells.
What will be an ideal response?
The original concept of ___________________ was to allow text to wrap around images.
Fill in the blank(s) with the appropriate word(s).