Question: Java. Write a call to the method majorKeyso that the println statement will not generate a syntax error. import java.util.Scanner; public class FinalCall { public

Java.

Write a call to the method majorKeyso that the println statement will not generate a syntax error. import java.util.Scanner; public class FinalCall {

public static void main (String args[]) {

Scanner keyboard = new Scanner(System.in); int majIndex = 7; char majorValue, sharpe[] = {'F', 'C', 'G', 'D', 'A', 'E', 'B'}; String opusName = keyboard.nextLine(); // the call to majorKey goes here System.out.println("Major key: " + majorValue);

} public static char majorKey(char key[], String name, int majIndex ) { char thiskey = key[majIndex%7]; for (int i = 1; i < key.length; i++) if (key[i] != 'C'))

return key[i];

if (name.equals("major"));

return thiskey;

else

return 'C';

}

}

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!