-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathCollection and Collections
28 lines (21 loc) · 1.56 KB
/
Collection and Collections
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
Collection is an interface in java which is implemented by List, Set and Map.
Collections is a class in Java which consists of famous methods such as Collections.sort() method.
All methods of Collections class are static methods.
Please go through all the classes and interfaces which implement Collection.
The following is the link for java docs: http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html
Whereas Collections is a proper class in java which consists of some famous predefined methods such as Collections.sort() method.
All methods of Collections class are static methods.
Please go through the following link for more details on the Collections class:
http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html
Whereas Comparable (compareTo(Object o) method) and Comparator(compare(Object o1, Object o2) and equals(Object o)),
both are interfaces in Java.
THE MOST IMPORTANT OF ALL.
Please go through the channel "SharingIsLearning" on Youtube. In this channel, the author has very nicely explained
the Collection interface and Collections class in detail and very precise. The total videos for the Collection interface
is about 4 videos. Please watch all the 4 videos (Each video is of hardly 6 minutes).
They are very helpful.
The following are the URL's of the above mentioned videos:
1) Java Collection -> https://www.youtube.com/watch?v=NGccvHsIU3A
2) List and Family -> https://www.youtube.com/watch?v=KCKrHDLZjT8
3) Set and Map -> https://www.youtube.com/watch?v=gRWloZnqvTQ
4) Java Collection Hands On -> https://www.youtube.com/watch?v=j3EUDM1NpDc