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

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; }

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!