-3
我得到這個代碼的錯誤:是非法類型的開始。非法開始類型 - 括號
我無法弄清楚在何處放置支架下面的代碼:
import java.util.Scanner; public class TaxCalculator {
public static void main(String [] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.println("What is your income?");
double income; //Income
income = keyboard.nextDouble();
System.out.println("How many dependents are in your household?");
int dependents; //Dependents
dependents = keyboard.nextInt();
}
public static void sd();
int singleyes = 5950;
int singleno = 11900;
boolean single = true;
if (single = yes)
StandardDeduction = 'yes';
} else if (single = no) {
StandardDeduction = 'no'; }
你的'sd()'方法聲明幾乎看起來像一個C/C++函數原型。 –