Java Collections
The collection is a framework in Java that provides an architecture to store and manipulate objects in Java. It contains the interface as mentioned below:
- List Interface
- Queue Interface
- Deque Interface
- Set Interface
- SortedSet Interface
- Map Interface
- Collection Interface
- Iterable Interface
Syntax of the Interfaces:
Interfaces |
Syntax |
---|---|
Iterable Interface |
Iterator iterator(); |
List Interface |
List <T> al = new ArrayList<> (); List <T> ll = new LinkedList<> (); List <T> v = new Vector<> (); |
Queue Interface |
Queue <T> pq = new PriorityQueue<> (); Queue <T> ad = new ArrayDeque<> (); |
Deque Interface |
Deque<T> ad = new ArrayDeque<> (); |
Set Interface |
Set<T> hs = new HashSet<> (); Set<T> lhs = new LinkedHashSet<> (); Set<T> ts = new TreeSet<> (); |
Sorted Set Interface |
SortedSet<T> ts = new TreeSet<> (); |
Map Interface |
Map<T> hm = new HashMap<> (); Map<T> tm = new TreeMap<> (); |
Java Cheat Sheet
Java is a programming language and platform that has been widely used since its development by James Gosling in 1982. It follows the Object-oriented Programming concept and can run programs written in any programming language. Java is a high-level, object-oriented, secure, robust, platform-independent, multithreaded, and portable programming language All those words are collectively called Java Buzzwords. It is commonly used for programming web-based, window, enterprise, and mobile applications. This Java Cheat Sheet article has been written by experts in Java and based on the experience of students who have recently undergone Java interviews.
This Core Java Cheat Sheet has been designed by Java experts, based on the experience of students who have recently undergone Java interviews. Whether you are a beginner or an experienced Java developer, this Java Cheat Sheet is a valuable resource for quickly accessing essential syntax, concepts, and best practices related to Java Programming.
Contact Us