[혼공단 8기] 3주차 미션
2022. 7. 24. 18:14
개발/Inafolio
혼공노트를 전체적으로 읽어보고 다음주에 시작할 미션인 12주! 내용을 읽어보았다 p512 8번 포장객체 내부의 값 비교 public class IntegerCompareEx { public static void main(String[] args) { Integer obj1 = 100; Integer obj2 = 100; Integer obj3 = 300; Integer obj4 = 300; System.out.println( obj1 == obj2); System.out.println( obj3 == obj4); } } 실행결과 이유 타입 값의 범위 boolean true, false char \u0000 ~ \u0071 byte, short, int -128 ~ 127 박싱된 값이 다음 표에 나와있는 ..
[혼공단 8기] 2주차 미션
2022. 7. 14. 06:01
개발/Inafolio
p.330 문제 5번 실행 결과 public class Parent { public String nation; public Parent() { this("대한민국"); System.out.println("Parent() call"); } public Parent(String nation) { this.nation = nation; System.out.println("Parent(String nation) call"); } } public class Child extends Parent{ private String name; public Child() { this("홍길동"); System.out.println("Child() call"); } public Child(String name) { this.n..