-2
我不斷收到預期的錯誤消息「)」。我無法確定原因。括號預計。但是哪裏?
import java.util.Scanner;
public class PartA extends ChangeDrawer
{
public static void main (String[] args)
{
Scanner input = new Scanner(System.in);
System.out.println("Enter P to make a purchase & receive your change");
System.out.println("Enter L to load the Change drawer");
System.out.println("Enter H to write the contents of the Change Drawer to a
web Page");
System.out.println("Enter E to exit the program"); //this is the user prompt
String selection = input.nextLine();
if{ //Error message: "(" expected
(String selection=L)
cDraw.loadFloat(floatDrawer);
}
}
}
(中左括號當我聽到「支架」我認爲[或。 – 2012-07-22 11:57:09