Java, help me please Write a call to the method countAs so that the println stat
ID: 3917700 • Letter: J
Question
Java, help me please
Write a call to the method countAs so that the println statement will not generate a syntax error.
import java.util.Scanner;
public class FinalTest {
public static void main (String args[]) {
Scanner keyboard = new Scanner(System.in);
int numberAs, scores[] = {90, 85, 95};
String incomplete = keyboard.nextLine();
// call to area here
System.out.println("Number of As is " + numberAs);
}
public static int countAs(int exam[], String gType) {
int num = exam[0];
for (int i = 1; i < exam.length; i++)
if (exam[i] >= 90)
num++;
if gType != "i";
return num;
else
return 0;
}
}