class Student{ int studentId; String name; Double score; public void study() { System.out.println("正在学习的"+name+"学号是"+studentId+",成绩为"+score); } } public class Main{ public static void main(String[] args){ Student student1 = new Student(); student1.name = "小明"; student1.studentId = 20240101; student1.score = 100.00; student1.study(); Student student2 = new Student(); student2.name = "闲汪"; student2.studentId = 20240102; student2.score = 90.00; student2.study(); } }