我的作业啊,后天就要交了,可我却始终不能让电脑把程序编译啊,到底错在哪里
2. 通过键盘输入月份,输出相应月份的英文单词
import java.io.*;
class month {
public static void main(String arguments[]) throws IOException
{
int month;
String str;
Bufferedreader buf;
buf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Input month number:");
str=buf.readLine();
month=Integer.parseInt(str);
System.out.print (month + "月的英文名称是"+ " words(int name).");
}
static String words(int name){
String words="Janeury" ;
switch (month){
case 1:
words="Janeury";
break;
case 2 :
words= "February";
break;
case 3:
words="March";
break;
case 4:
words= "April";
break;
case 5:
words= "May";
break;
case 6:
words="Jaue";
break;
case 7:
words="July";
break;
case 8:
words="August";
break;
case 9:
words="September";
break;
case 10:
words="October";
break;
case 11:
words="November";
break;
case 12:
words="December";
break;
}
return words;
}
}