System.arraycopy1 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. 이전 1 다음