学生管理系统Demo
package Student;
import java.util.Scanner;
public class Student {
String[][] stu = { { "小名", "男", "1", "98" }, { "小的", "男", "2", "89" }, { "小个", "女", "3", "93" },
{ "小如", "女", "4", "94" }, { "小过", "男", "5", "97" } };
// 1查看 ok
void check() {
for (int i = 0; i < stu.length; i++) {
System.out.print("姓名:" + stu[i][0] + " " + "姓别:" + stu[i][1] + " " + "学号:" + stu[i][2]
+ " " + "成绩:" + stu[i][3] + " ");
System.out.println();
}
}
// 2根据学号查看 ok
void check1() {
System.out.println("请输入要查看的学生的学号");
Scanner scan = new Scanner(System.in);
String stunum = scan.nextLine();
int m = 0;
for (int i = 0; i < stu.length; i++) {
if (stu[i][2].compareTo(stunum) == 0) {
m = m + 1;
System.out.print("姓名:" + stu[i][0] + " " + "姓别:" + stu[i][1] + " " + "学号:"
+ stu[i][2] +