老师让我们边程序可我编了很长时间好不容易没有错误了可却无法编译啊
题目是 2. 通过键盘输入月份,输出相应月份的英文单词
我编的程序是
import java.io.*;
public class month {
public static void main(String args[]) 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.println(month+ "is"+ " wordEnglish(int name)"+ "is "+"name");
}
static int wordEnglish(int name){
int word=janeury ;
switch (month){
case 1:
name=janeury;
break;
case 2 :
name= February;
break;
case 3:
name=march;
break;
case 4:
name= April;
break;
case 5:
name= May;
break;
case 6:
name=Jaue;
break;
case 7:
name=July;
break;
case 8:
name=August;
break;
case 9:
name=september;
break;
case 10:
name=october;
break;
case 11:
name=November;
break;
case 12:
name=December;
break;
}
return name;
}
}
我想知道哪里出错了 本人Q308866049 邮箱wanglkuy@126.com 谢谢