From 136347118f59af0dec2200905cd90fe429e7f69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E6=9C=80=E7=89=9Bbi?= <2875965184@qq.com> Date: Thu, 18 Apr 2024 17:13:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainTest.java" | 8 ----- .../main.java" | 28 ++++++++++++++++ .../studentmain.java" | 32 +++++++++++++++++++ 3 files changed, 60 insertions(+), 8 deletions(-) delete mode 100644 "work/com/java/minxi/java_20240415/java_2301_\345\274\240\344\270\211_2000212322/MainTest.java" create mode 100644 "work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/main.java" create mode 100644 "work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/studentmain.java" diff --git "a/work/com/java/minxi/java_20240415/java_2301_\345\274\240\344\270\211_2000212322/MainTest.java" "b/work/com/java/minxi/java_20240415/java_2301_\345\274\240\344\270\211_2000212322/MainTest.java" deleted file mode 100644 index 90b0d015..00000000 --- "a/work/com/java/minxi/java_20240415/java_2301_\345\274\240\344\270\211_2000212322/MainTest.java" +++ /dev/null @@ -1,8 +0,0 @@ -package com.java.minxi.java_20240415.java_2301_张三_2000212322; - -public class MainTest { - - public static void main(String[] args) { - System.out.println("Hello World"); - } -} \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/main.java" "b/work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/main.java" new file mode 100644 index 00000000..9dd36003 --- /dev/null +++ "b/work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/main.java" @@ -0,0 +1,28 @@ +package com.java.minxi.java_20240418.java_2301_徐飞祥_2344310102; + +public class main { +//成员属性 + int id; + String xingming; + int age; + String sex; + +public void runnibng(){ + //局部变量 +int speed = 5; + System.out.println(xingming+"的速度"+speed); +} +public void eat(){ + //吃饭 + System.out.println(xingming+"正在吃饭"); + +} +public void sleep(){ + int time =8; + System.out.println(xingming+"每天睡觉的时间"+time); +} + + + + +} diff --git "a/work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/studentmain.java" "b/work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/studentmain.java" new file mode 100644 index 00000000..0025dd62 --- /dev/null +++ "b/work/com/java/minxi/java_20240418/java_2301_\345\276\220\351\243\236\347\245\245_2344310102/studentmain.java" @@ -0,0 +1,32 @@ +package com.java.minxi.java_20240418.java_2301_徐飞祥_2344310102; + +public class studentmain { + public static void main(String[] args) { +int [] arr = new int[5]; + main st1 = new main(); + st1.id=1; + st1.age=21; + st1.sex="男"; + st1.xingming="张三"; + System.out.println(st1); +st1.runnibng(); + + +main st2 = new main(); + st2.id=2; + st2.age=25; + st2.sex="男"; + st2.xingming="李四"; + System.out.println(st2); + st2.eat(); + + main st3 = new main(); + + st3.id=3; + st3.age=19; + st3.sex="女"; + st3.xingming="王丽"; + System.out.println(st3); + st3.sleep(); + } +} -- Gitee