我正在为学校的项目设计一个代码,并且在编译以下代码时我得到的唯一错误代码是令牌上的语法错误"返回",字节预期。
static public int getMonthlyTotal(){
//Calulates utilities
int monthlyTotal = 0;
//Define imput streams
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
monthlyTotal = (150 + 60 + 20 + 60 + 800);
}
return monthlyTotal;
答案 0 :(得分:0)
static public int getMonthlyTotal(){
//Calulates utilities
int monthlyTotal = 0;
//Define imput streams
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
monthlyTotal = (150 + 60 + 20 + 60 + 800);
return monthlyTotal;
}