各位高手都是自己自学的吗?
有哪位报社会上的某某培训班了吗,推荐一下哪个好啊?
谢谢!
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.print (month + "is"+ " wordEnglish(int name)"+ "is "+"name");
}
static String wordEnglish(int name){
String word="Janeury" ;
switch (month){
case 1:
word="Janeury";
break;
case 2 :
word= "February";
break;
case 3:
word="March";
break;
case 4:
word= "April";
break;
case 5:
word= "May";
break;
case 6:
word="Jaue";
break;
case 7:
word="July";
break;
case 8:
word="August";
break;
case 9:
word="September";
break;
case 10:
word="October";
break;
case 11:
word="November";
break;
case 12:
word="December";
break;
}
return word;
}
}
哪里有错啊