Java 标记“”上的语法错误;return";,应为字节

Java 标记“”上的语法错误;return";,应为字节,java,Java,我正在学校为一个项目设计一个代码,在编译下面的代码时,我得到的唯一错误代码是标记“return”上的语法错误,应该是字节 static public int getMonthlyTotal(){ //Calulates utilities int monthlyTotal = 0; //Define imput streams InputStreamReader input = new InputStreamReader(System.in); BufferedReader

我正在学校为一个项目设计一个代码,在编译下面的代码时,我得到的唯一错误代码是标记“return”上的语法错误,应该是字节

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;

盯着
returnmonthlytotal(前面还有一行)交换最后两行,即在结束前移动
返回
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;

}