一直試圖弄清楚這個問題,幾個小時以來一直令我頭腦發熱。(double,int)不能應用於(雙精度)
我有這是主要的方法:
public static void main(String [] args)
{
double payRate;
double grossPay;
double netPay;
int hours;
Scanner input = new Scanner(System.in);
System.out.println("Welcome to the Pay Roll Program");
printDescription();
System.out.print("Please input the pay per hour: ");
payRate = input.nextDouble();
System.out.println("\nPlease input the pay per hour: ");
hours = input.nextInt();
System.out.println("\n");
netPay = computePaycheck(netPay);
System.out.println("The net pay is $" + (netPay));
System.out.println("We hope you enjoyed this program");
System.exit(0);
和計算的netPay
public static double computePaycheck(double payRate, int hours)
{
double grossPay = computePaycheck(payRate*hours);
double netPay = (grossPay - (grossPay *.15));
return netPay;
}
但我發現了在薪水錯誤「computePaycheck(雙,INT)的方法不能(雙)「
我有點理解這一點,但我不能爲我的生活找出補救措施。
哪個IDE用於開發? – hanumant