📕🐘 도로락 - 코끼리를 냉장고에 넣는 방법

# Collections.EMPTY_LIST (1)

자바[Java] 2017. 11. 24. 00:53

[Java] Collections.EMPTY_LIST

Collections.EMPTY_LIST 의 기능Collections 클래스에는 다음과 같이 EMPTY_LIST가 정의되어 있습니다.EMPTY_LIST는 public 상수이며 EmptyList 타입 입니다. 또한 정적 상수이기 때문에 싱글톤 객체로 이용 됩니다.EmptyList 클래스는 내부 클래스로 Collections 클래스 내부에 private 접근자로 정의되어 있기 때문에 상수 또는 emptyList() 메서드를 통해서만 접근이 가능합니다.Collections 클래스 일부 내용public static final List EMPTY_LIST = new EmptyList();public static final List emptyList() { return (List) EMPTY_LIST;}Em..