package CHAPTER09;

import java.util.Arrays;
import java.util.List;

public class C9_04_Wildcard {
	// 무제한 와일드카드를 사용한 메서드
    public static void printList(List<?> list) {
        for (Object item : list) {
            System.out.println(item);
        }
    }
    public static void main(String[] args) {
        List<String> stringList = Arrays.asList("Apple", "Banana", "Cherry");
        List<Integer> intList = Arrays.asList(1, 2, 3);

        System.out.println("String List:");
        printList(stringList); 

        System.out.println("Integer List:");
        printList(intList);    
    }
}
