Files
java-cui-em-oop/em-oop/src/BasicCheck2.java
2026-09-18 12:45:29 +09:00

37 lines
894 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

public class BasicCheck2 {
public static void main(String[] args) {
// Student student = new Student(3,"a");
//Student型のstudentを宣言、インスタンスを代入する
Student student1 = new Student(1,"鈴木一郎");
Student student2 = new Student(2, "田中花子");
Student student3 = new Student(3,"佐藤次郎");
// student1.studentId = 1;
// student1.name = "鈴木一郎";
// //studentIDに1,nameに鈴木一郎を代入
//
// student2.studentId = 2;
// student2.name ="田中花子";
//
// student3.studentId = 3;
// student3.name ="佐藤次郎";
//
//studentのprintProfileメソッドを呼び出す
student1.printProfile();
student2.printProfile();
student3.printProfile();
Student.getStudentCount();
}
}
//
//System.out.print("学籍番号"+student.studentId);
//System.out.print("名前:" + student.name);