From 8f8bc592c2bba492eb31e34c623ba3c09ad932d4 Mon Sep 17 00:00:00 2001 From: yizhiyun <2094853677@qq.com> Date: Thu, 18 Apr 2024 12:00:48 +0000 Subject: [PATCH 1/2] =?UTF-8?q?add=20C:\Users\Administrator\Desktop\?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=96=87=E4=BB=B6=E5=A4=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yizhiyun <2094853677@qq.com> --- ...\\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "C:\\Users\\Administrator\\Desktop\\\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271" diff --git "a/C:\\Users\\Administrator\\Desktop\\\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271" "b/C:\\Users\\Administrator\\Desktop\\\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271" new file mode 100644 index 0000000..e69de29 -- Gitee From b6cc5390eb88bae85315dc41c1bd1f2680f77d97 Mon Sep 17 00:00:00 2001 From: yizhiyun <2094853677@qq.com> Date: Thu, 18 Apr 2024 13:36:03 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yizhiyun <2094853677@qq.com> --- .../Ac.java" | 17 +++++++++++++ .../Student.java" | 25 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 "java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Ac.java" create mode 100644 "java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Student.java" diff --git "a/java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Ac.java" "b/java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Ac.java" new file mode 100644 index 0000000..d91ef3b --- /dev/null +++ "b/java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Ac.java" @@ -0,0 +1,17 @@ +package com.java.minxi.java_20240418.java2302.work.com.java.minxi.java_20240418.java_2302_易志昀_2344310235; + +public class Ac { + public static void main(String[] args) { + + Student s1=new Student(1,"张三",21,"男"); + Student s2=new Student(2,"李四",25,"男"); + Student s3=new Student(3,"王五",19,"女"); + s1.run(); + s2.eat(); + s3.sleep(); + System.out.println("学生1"+s1); + System.out.println("学生2"+s2); + System.out.println("学生3"+s3); + } + +} diff --git "a/java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Student.java" "b/java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Student.java" new file mode 100644 index 0000000..0092458 --- /dev/null +++ "b/java_20240418/java_2302_\346\230\223\345\277\227\346\230\200_2344310235/Student.java" @@ -0,0 +1,25 @@ +package com.java.minxi.java_20240418.java2302.work.com.java.minxi.java_20240418.java_2302_易志昀_2344310235; + +public class Student { + public int id; + public String name; + public int age; + public String sex; + + public Student(int id, String name, int age, String sex){ + this.id =id; + this.name=name; + this.age=age; + this.sex=sex; + } + public void run(){ + System.out.println(this.name+"跑步"); + } + public void eat(){ + System.out.println(this.name+"吃饭"); + } + public void sleep(){ + System.out.println(this.name+"睡觉"); + } + +} -- Gitee