자바 제너릭 썸네일형 리스트형 제너릭 (Box) 예제1) // 제너릭 : 멤버변수나 멤버함수를 자료형별로 구할 필욕없이 하나만 구현해서 사용 가능하도록 하는 기능. 뾰족괄호public class Test3 {public static void main(String[] args) {Box b1=new Box(); //class Box의 뾰족괄호안에 Integer이 들어가서 T는 모두 Integer이 대입된다.b1.set(new Integer(10));Integer ii=b1.get();System.out.println(ii);b1.write();System.out.println();Box b2=new Box();b2.set("테스트");String ss=b2.get();System.out.println(ss);b2.write();System.out.pri.. 더보기 이전 1 다음