From 8f5165fe4e933f9d63550430c0ea868ddbe4c0b8 Mon Sep 17 00:00:00 2001 From: XuJingwang Date: Tue, 17 Mar 2026 18:55:54 +0800 Subject: [PATCH] =?UTF-8?q?W2-=E5=BE=90=E6=99=AF=E6=97=BA-202414010701?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- W2/Student.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 W2/Student.java diff --git a/W2/Student.java b/W2/Student.java new file mode 100644 index 0000000..9bf1cbc --- /dev/null +++ b/W2/Student.java @@ -0,0 +1,22 @@ +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(); + + } +}