Last active
February 17, 2020 03:18
-
-
Save keegoo/cce3d35d25e78e16637a0bd9a843b6f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Collection and Map are interfaces. | |
// compare to Array and Map in other languages. | |
import java.util.Collection | |
import java.util.Map | |
// sample methods of Collection interface: | |
// | |
// add | |
// clear | |
// equals | |
// isEmpty | |
// iterator | |
// sample methods of Map interface: | |
// | |
// get(key) | |
// keySet() | |
// values() | |
// put(key, value) | |
// containsKey(value) | |
// containsValue(value) | |
// Set, List and Queue are child interfaces of Collection. | |
// ArrayList is resizable. | |
// LinkedList is implemented as a double linked list. add and remove on two ends are efficient. | |
// | |
// clear explanation on ArrayList and LinkedList | |
// | |
// https://www.programcreek.com/2013/03/arraylist-vs-linkedlist-vs-vector/ | |
// java.util package | |
import java.util.Iterator; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.lang.Integer; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment