下面是下饭code内容
\
public static void main(String args[])throws java.io.IOExceptions{
char c = (char)System.in.read();
switch(c) {
case'1':
System.out.ptintln("your input is less than 3 MF");break;
case'4':
case'5':
case'6':
System.out.ptintln(c+">3");break;
default://otherwise
System.out.println(c);
}
}
\
其实还有其他几个error也不知道怎么解决= =
= =xd,这code其实是书上抄的,就是一个检验输入的code(应该)
用这段代码:
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
switch(s) {
case "1":
System.out.println("your input is less than 3 MF");break;
case "4":
case "5":
case "6":
System.out.println(s+">3");break;
default://otherwise
System.out.println(s);
}
靓仔,你的主体类呢