Language&FrameWorks/Java14 속았던 문제? 다음 실행 결과는? package ch07.ex14; class Exercise7_20 { public static void main(String[] args) { Parent p = new Child(); Child c = new Child(); System.out.println("p.x = " + p.x); p.method(); System.out.println("c.x = " + c.x); c.method(); } } class Parent { int x = 100; void method() { System.out.println("Parent Method"); } } class Child extends Parent { int x = 200; void method() { System.out.print.. 2011. 5. 7. System.arraycopy 예제 package ch07.ex14; class Exercise7_19 { public static void main(String args[]) { Buyer b = new Buyer(); b.buy(new Tv()); b.buy(new Computer()); b.buy(new Tv()); b.buy(new Audio()); b.buy(new Computer()); b.buy(new Computer()); b.buy(new Computer()); b.summary(); } } class Buyer { int money = 1000; Product[] cart = new Product[3]; // 구입한 제품을 저장하기 위한 배열 int i = 0; // Product배열 cart에 사용될 index void.. 2011. 5. 7. javadoc unmappable character for encoding MS949 Javadoc 사용시 한글 처리 unmappable character for encoding MS949 가 발생하는데 character encoding문제 VM options에 아래 사항 추가 -locale ko_KR -encoding UTF-8 -charset UTF-8 -docencoding UTF-8 2011. 4. 5. Json 에서의 한글은 인코딩하여 보내준다. Json 에서의 한글은 인코딩하여 보내준다. 따라서 URLDecoder.디코딩을 한 후 Byte 로 받은 후 다시 인코딩하여 보내야 한다.. 아..삽.; 2011. 1. 28. 이전 1 2 3 4 다음