클래스 기초 썸네일형 리스트형 [JAVA] student 클래스의 멤버변수를 적절한 생성자를 이용해 초기화하기 Q. student 클래스의 멤버변수를 default 생성자가 아닌 적절한 생성자를 이용하여 초기화하는 프로그램을 만들어보세요. public class Student { String name; int age; double height; public Student(String name, int age, double height) { this.name = name; this.age = age; this.height = height; } } public class Student_1 { public static void main(String[] args) { Student stu = new Student("도토리", 33, 160.4); System.out.println("이름 : " + stu.name); S.. 더보기 이전 1 다음