연습문제(배열)
2023. 10. 19.
public class PersonTest { public static void main(String[] args) { Person kimcoding = new Person("김코딩", "프로그래머", 30); Person nahacker = new Person("나해커", "해커", 32, true); int age = kimcoding.getAge(); System.out.println("김코딩의 나이는 " + age + "살 입니다."); } } class Person { private String name; private String occupation; private int age; private boolean isSingle; Person(){ System.out.println("첫 번째 생성..