You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
525 B
22 lines
525 B
public class Student {
|
|
|
|
String StudentID;
|
|
String name;
|
|
double score;
|
|
void study(){
|
|
System.out.println(name +" " +StudentID + " "+score);
|
|
}
|
|
public static void main(String[] args) {
|
|
Student s1=new Student();
|
|
Student s2=new Student();
|
|
s1.StudentID="202413010901";
|
|
s2.StudentID="202413010902";
|
|
s1.name="张三";
|
|
s2.name="李四";
|
|
s1.score=88.6;
|
|
s2.score=92.3;
|
|
s1.study();
|
|
s2.study();
|
|
|
|
}
|
|
}
|
|
|