1.Scanner 语句的使用为
Scanner sc = new Scanner(System.in);
System.out.println("使用next方式接收");
if (sc.hasNextLine()) {
//使用hasNextLie()会接收一行,
//hasNextLie()一整行;
String str = sc.nextLine();//next(), nextLine().
System.out.println("输入的内容为:"+str);
//input: hello word
//输出:hello
}
sc.close();
2.if语句的使用为
if(c>80) {
System.out.println("优秀");
}else if(c>=60){
System.out.println("及格");
}else{
System.out.println("不及格");
3.复合使用为
Scanner a = new Scanner(System.in) ;
System.out.pri