Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
预期的'';在java中进行简单的算术运算_Java - Fatal编程技术网

预期的'';在java中进行简单的算术运算

预期的'';在java中进行简单的算术运算,java,Java,我不知道具体是什么,但我想这是我写手术的方式 public class temperatureConversion { public static void main( String [] args) { //freezing point constant final int FREEZING_POINT = 32; //fahrenheit input int fahrenheit = 75;

我不知道具体是什么,但我想这是我写手术的方式

public class temperatureConversion
{
    public static void main( String [] args)
    {
        //freezing point constant
        final int FREEZING_POINT = 32;

        //fahrenheit input
        int fahrenheit = 75;

        //Fahrenheit to Celsius conversion
        double celsius =(fahrenheit- FREEZING_POINT)9.0/5.0;
错误:';'预期 双摄氏度=(华氏-冰点)9.0/5.0


标记点在9处。如果您缺少一个运算符,我假定您打算进行乘法运算(它不是隐含的)。改变


你错过了
*
(介于
9.0之间的
*
,谢谢。我看了这么久,现在觉得自己很傻
double celsius =(fahrenheit- FREEZING_POINT)9.0/5.0;
double celsius =(fahrenheit- FREEZING_POINT)*9.0/5.0;