2016-10-20 12 views
-1

シンボル:メソッドnextDoublenextDoubleエラーシンボル:メソッドnextDouble

nextDouble "エラー"

いずれかは、私はそれを修正するために助けることができますか? java.util.ScannerStringを混乱

double fahrenheit; 

    String input = JOptionPane.showInputDialog(null, "Enter the Fahrenheit degre : "); 

    fahrenheit = input.nextDouble(); 

    double Celsius = 5/9 * (fahrenheit-32); 

    JOptionPane.showMessageDialog(null, " in Celsius : " + Celsius); 
+0

から返さところであなたは整数除算の問題を持っている - (華氏-32)* 'ダブル摂氏= 5/9.0を使用します;' – Reimeus

答えて

2

You'e。解析した文字列がshowInputDialog

fahrenheit = Double.parseDouble(input); 
関連する問題