From e5b924041f8726fa6d953907692aaafeb473df3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BE=B7=E5=BA=B7?= <1669327472@qq.com> Date: Fri, 23 Dec 2022 13:35:57 +0800 Subject: [PATCH] =?UTF-8?q?20221223=20=E5=AD=A6=E7=94=9F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...41\347\220\206\347\263\273\347\273\237.md" | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git "a/13 \345\274\240\345\276\267\345\272\267/20221222 \345\255\246\347\224\237\347\256\241\347\220\206\347\263\273\347\273\237.md" "b/13 \345\274\240\345\276\267\345\272\267/20221222 \345\255\246\347\224\237\347\256\241\347\220\206\347\263\273\347\273\237.md" index 5ed1513..d7eb1b8 100644 --- "a/13 \345\274\240\345\276\267\345\272\267/20221222 \345\255\246\347\224\237\347\256\241\347\220\206\347\263\273\347\273\237.md" +++ "b/13 \345\274\240\345\276\267\345\272\267/20221222 \345\255\246\347\224\237\347\256\241\347\220\206\347\263\273\347\273\237.md" @@ -7,13 +7,21 @@ public class A1 { public static void main(String[] args) { System.out.println( "\n欢迎使用学生管理工具"+ - "\n \t\t1.浏览所以学生管理信息"+ - "\n \t\t2.添加学生信息\t\t"+ - "\n \t\t3.修改学生信息\t\t"+ - "\n \t\t4.删除学生信息\t\t"+ - "\n \t\t5.查询学生信息\t\t"+ - "\n \t\t6.退出管理系统\t\t" + "\n \t\t1.浏览所以学生管理信息"+ + "\n \t\t2.添加学生信息\t\t"+ + "\n \t\t3.修改学生信息\t\t"+ + "\n \t\t4.删除学生信息\t\t"+ + "\n \t\t5.查询学生信息\t\t"+ + "\n \t\t6.退出管理系统\t\t" ); + String[] xuesheng = new String[10]; + xuesheng[0]="小炫"; + xuesheng[1]="雪豹"; + Scanner cs = new Scanner(System.in); + System.out.println("请输入数字查询信息"); + int vs = cs.nextInt(); + fayi1(xuesheng); + } public static void fa(int num){ switch (num){ @@ -38,9 +46,15 @@ public class A1 { default: System.out.println("输入错误"); } - Scanner cs = new Scanner(System.in); - System.out.println("输入查找信息"); - num= cs.nextInt(); + } + public static void fayi1(String[] stu){ + System.out.println("现有以下同学:"); + for (String name:stu) { + if (name==null){ + continue; + } + System.out.print(name+"\t"); + } } } ``` -- Gitee