import java.util.Scanner;
public class hg {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("请输入学生信息:");
Scanner sc=new Scanner(System.in);
String name;
int age;
float score;
System.out.println("请输入学生姓名:");
name=sc.next();
System.out.println("请输入学生年龄:");
age=sc.nextInt();
System.out.println("请输入学生成绩:");
score=sc.nextFloat();
System.out.println("你输入的学生:姓名:"+name+",年龄:"+age+",成绩:"+score);
}
}
运行结果: