티스토리 뷰
Collection - Interface
Collection is a base interface of the Java Collection Framework for List, Set and Queue.
Collections - class
Collections is a class in java.util package and it is utility class for Collection.
Collections class has methods for Sorting, Searching etc
Example
Collections.addAll(A,B);
Collections.addAll method takes all of the elements of 'B' and fetch the elements to the collection 'A'
Collections.sort(A);
Collections.sort method sorts the element of specified list 'A' in ascending order.
Reference
https://www.quora.com/What-are-the-main-differences-between-Collection-and-Collections-in-Java
https://www.geeksforgeeks.org/collections-sort-java-examples/
'JAVA' 카테고리의 다른 글
Object type casting(upcasting,downcasting) example in Java (0) | 2019.06.17 |
---|---|
StringBuffer in Java (0) | 2019.03.05 |
How to convert Arrays to List (0) | 2019.02.26 |
Lambda Expression in Java (0) | 2019.02.22 |
compareTo method in Java (0) | 2019.02.21 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- java
- easy algorithm
- easy javascript algorithm
- rest parameter
- 알고리즘
- algorithm
- string class in java
- C++
- math.max
- hackerrank javascript solution
- Object type casting
- equals()
- 프로그래머스
- hackerrank javascript
- 프로그래머스 알고리즘
- spring boot application
- HashMap
- Collection Framework
- substring()
- hackerrank solution
- math.abs
- code refactoring
- 프로그래머스 알고리즘문제
- hackerrank
- javascript
- compareTo()
- HackerRank Algorithm
- Javascript Algorithm
- repeat()
- ... in Javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함