• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

어렵다

컬렉션 프레임워크와 제네릭

정렬 탐색 List<E>를 구현한 컬렉션 클래스들은 정렬한 상태를 유지하지 않는다. 대신 정렬을 해야한다면 다음 메소드를 사용할 수 있다. [코드 해석] <T extends Comparable<? super T>> : sort() 메소드가 제네릭임을 명시 왼쪽의 T는 Comparable<? super T>를 구현해야한다. 즉, 매개변수로 전달되는 List<T>의 T가 Comparable<T>...

어렵다제네릭자바Java컬렉션GenericCollectionCollection

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more