我正在开发一个项目,只是为了测试 Java 开发人员的 Eclipse IDE。我是 java 新手,所以我想知道为什么它不起作用,因为我已经知道该怎么做。这是代码:
public class eclipse {
public static double main(String[] args) {
// TODO Auto-generated method stub
final double average(double number, double number2)
{
double number3 = (number + number2)/2;
return number3;
}
final double suk(double number4, double number5)
{
double number6 = number4 + number5;
return number6;
}
final double differenck(double number7, double number8)
{
double number9 = number7 - number8;
return number9;
}
final double produck(double number10, double number11)
{
double number12 = number10*number11;
return number12;
}
}
}
这是出现的错误:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "(", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
Void methods cannot return a value
Syntax error on token "(", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
Void methods cannot return a value
Syntax error on token "(", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
Void methods cannot return a value
Syntax error on token "(", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
Void methods cannot return a value