Files
java-cui-em-oop/em-oop/src/Student.java
m-shimizu 357ad900a1 段階2
2026-09-15 13:51:34 +09:00

24 lines
401 B
Java

public class Student {
int studentId;
String name;
public Student(int studentId, String name) {
this.studentId = studentId;
this.name = name;
}
public void printProfile() {
System.out.println("学籍番号:" + this.studentId + " 名前:" + this.name);
}
//public static void main(String[] args) {
//Student s = new Student(1,"鈴木一郎");
//s.printProfile();
//}
}