语法错误,插入“VariableDeclarators”以完成LocalVariableDeclaration

时间:2015-05-31 09:11:39

标签: java anylogic

我试图在anylogic中编写以下函数:

double calSwgeFeeDclne () { 

    double sewegeFeeDecline;
    if(swegeFee<reqSwgeFee){
        sewegeFeeDecline=0.0;
    }
    else{
        sewegeFeeDecline=min((swegeFee-0.2),(swegeFee-reqSwgeFee));
    }

    return sewegeFeeDecline; 
}

但我收到错误:

Multiple markers at this line
- Syntax error, insert "VariableDeclarators" to complete 
 LocalVariableDeclaration
- Syntax error, insert "}" to complete MethodBody
- Syntax error, insert ";" to complete LocalVariableDeclarationStatement

我在这个页面上找到了答案: Why do I need brackets here? Java: "if (true) int i=0;"

但我仍然不确定该怎么做我的代码现在应该成为什么建议?

0 个答案:

没有答案