package chapter20230814.student1;
public class Test {
public static void main(String[] args) {
Student studen = new Student("kim", "0001", 20);
}
}
package chapter20230814.student1;
public class Student {
private String name;
private String rollno;
private int age;
public Student(String name, String rollno, int age) {
this.name = name;
this.age = age;
this.rollno = rollno;
System.out.println("학생의 이름: " + name);
System.out.println("학생의 학번: " + rollno);
System.out.println("학생의 나이: " + age);
System.out.println("Student 객체가 생성되었습니다.");
}
}