なぜ購入は互換性のないタイプになるのscan.next()
でしょうか?(私は購入と入札のためにユーザー入力を取得し、次に変更を計算する方法を使用しようとしています)。
public static void makeChange() //one method of a class
{
double purchase;
double tendered;
Scanner scan = new Scanner (System.in);
System.out.println ("How much was the Purchase?");
purchase = scan.next(); //why would this be an incompatible type?
System.out.println ("Amount Tendered");
tendered = scan.next();
System.out.println("Processing Transaction");
int ch[] = cd.makeChange(purchase, tendered);
.... continued