Audience
This tutorial has been prepared for the beginners to help them understand the basic functionality related to all the classes and it's methods available in java.util package.Following are a list of classes under java.util package. I explained all the methods with lots of examples from each class. Our suggestion is to do lots of hands experience using this tutorial.
Click on each class will navigate to their respective page.
java.util Package Classes
>> java.util ArrayList Class
In this article, we will learn all the ArrayList class methods with examples. Java ArrayList class uses a dynamic array for storing the elements. It inherits AbstractList class and implements List interface.>> java.util.Arrays Class
In this article, we will learn important utility methods of Arrays class with examples. The java.util.Arrays class contains a static factory that allows arrays to be viewed as lists and for manipulating arrays (such as sorting and searching).>> java.util.Collections Class
java.util.Collections class consists exclusively of static methods that operate on or return collections.It contains polymorphic algorithms that operate on collections, "wrappers", which return a new collection backed by a specified collection, and a few other odds and ends.
>> java.util EnumMap Class
In this article, we will learn all about EnumMap in Java. What is EnumMap and how to use it with examples?>> java.util EnumSet Class
In this article, we’ll discuss EnumSet class from the java.util package.EnumSet is a specialized Set implementation for use with enum types. All of the elements in an enum set must come from a single enum type that is specified, explicitly or implicitly, when the set is created. Enum sets are represented internally as bit vectors. This representation is extremely compact and efficient.>> java.util HashMap Class
In this article, we will learn the HashMap implementation of Map Interface from Java Collections Framework. This article covers all the important HashMap class APIs with examples.>> java.util HashSet Class
In this article, we’re going to take a look at HashSet class from Java Collections Framework.We will learn all the APIs that HashSet implementation offers. HashSet class implements the Set interface, backed by a hash table (actually a HashMap instance).
>> java.util IdentityHashMap Class
In this article, we will learn about IdentityHashMap class methods with examples.The IdentityHashMap is a HashTable based implementation of Map Interface. Normal HashMap compares keys using '.equals' method. But Identity HashMap compares its keys using '==' operator.
>> java.util LinkedHashMap Class
In this article, we will learn LinkedHashMap class implementation of Map interface using examples.If you want a predictable iteration order of the elements in a Map, then you can use a LinkedHashMap. This article covers all the important APIs that LinkedHashMap Class offers.
>> java.util LinkedHashSet Class
In this article, we will learn the LinkedHashSet class implementation of the Set interface with examples.>> java.util LinkedList Class
In this article, we will see the Implementation of LinkedList class with examples.Java LinkedList class uses a doubly linked list to store the elements. It provides a linked-list data structure. It inherits the AbstractList class and implements List and Deque interfaces.
>> java.util TreeMap Class
In this guide, we see the Implementation of TreeMap class using examples.TreeMap is A Red-Black tree based NavigableMap implementation.>> java.util TreeSet Class
In this article, we will learn TreeSet class methods with examples.>> java.util WeakHashMap Class
In this article, we will learn WeakHashMap class from java.util package with examples.WeakHashMap is a Hash table based implementation of the Map interface, with weak keys. An entry in a WeakHashMap will automatically be removed when its key is no longer in ordinary use.
java.util Package Interfaces
>> java.util Collection Interface
Collection Interface is the root interface in the collection hierarchy. A Collection represents a group of objects known as its elements. A list, Queue, and Set are all subinterfaces of Collection interface.>> java.util Comparator Interface
The Comparable interface that we learned in the previous guide defines a default ordering for the objects of a class. This default ordering is also called the natural ordering of the objects.>> java.util List Interface
In this article, we will learn what is List interface and it's implementations - ArrayList and LinkedList.>> java util Map Interface
In this article, we will learn what is Map interface and it's three general-purpose implementations: HashMap, TreeMap, and LinkedHashMap.>> java.util Set Interface
In this article, we will learn what is Set interface and it's three general-purpose Set implementations: HashSet, TreeSet, and LinkedHashSet.>> java.util SortedMap Interface
A SortedMap is a Map that maintains its entries in ascending order, sorted according to the keys natural ordering, or according to a Comparator provided at the time of the SortedMap creation.>> java.util SortedSet Interface
A SortedSet is a Set that maintains its elements in ascending order, sorted according to the natural ordering or according to a Comparator provided at SortedSet creation time.Java ArrayList API Guides
- Java ArrayList add() Method
- Java ArrayList addAll() Method
- Java ArrayList addFirst() Method
- Java ArrayList addLast() Method
- Java ArrayList clear() Method
- Java ArrayList clone() Method
- Java ArrayList contains() Method
- Java ArrayList ensureCapacity() Method
- Java ArrayList equals() Method
- Java ArrayList forEach() Method
- Java ArrayList get() Method
- Java ArrayList indexOf() Method
- Java ArrayList isEmpty() Method
- Java ArrayList iterator() Method
- Java ArrayList lastIndexOf() Method
- Java ArrayList listIterator() Method
- Java ArrayList removeAll() Method
- Java ArrayList remove() Method
- Java ArrayList removeFirst() Method
- Java ArrayList removeLast() Method
- Java ArrayList retainAll() Method
- Java ArrayList spliterator() Method
- Java ArrayList subList() Method
- Java ArrayList toArray() Method
- Java ArrayList trimToSize() Method
Java HashMap API Guides
- Java HashMap put() Method
- Java HashMap clear() Method
- Java HashMap containsKey() Method
- Java HashMap containsValue() Method
- Java HashMap get() Method
- Java HashMap isEmpty() Method
- Java HashMap putAll() Method
- Java HashMap remove() Method
- Java HashMap size() Method
- Java HashMap entrySet() Method
- Java HashMap keySet() Method
- Java HashMap getOrDefault() Method
- Java HashMap putIfAbsent() Method
- Java HashMap remove(Object key, Object value) Method
- Java HashMap replace() Method
- Java HashMap forEach() Method
- Java HashMap compute() Method
- Java HashMap computeIfAbsent() Method
- Java HashMap merge() Method
- Java HashMap keySpliterator() Method
- Java HashMap valueSpliterator() Method
- Java HashMap entrySpliterator() Method
- Java HashMap keySet().stream() Method
- Java HashMap entrySet().stream() Method
- Java HashMap values() Method
- Java HashMap replaceAll() Method
Java HashSet API Guides
- Java HashSet add() Method
- Java HashSet clear() Method
- Java HashSet clone() Method
- Java HashSet isEmpty() Method
- Java HashSet iterator() Method
- Java HashSet newHashSet() Method (Introduced in Java 21)
- Java HashSet remove() Method
- Java HashSet size() Method
- Java HashSet spliterator() Method
- Java HashSet toArray() Method
- Java HashSet addAll() Method
- Java HashSet containsAll() Method
- Java HashSet removeAll() Method
- Java HashSet retainAll() Method
- Java HashSet stream() Method
- Java HashSet parallelStream() Method
- Java HashSet forEach() Method
- Java HashSet removeIf() Method
Java LinkedHashMap API Guides
- Java LinkedHashMap put() Method
- Java LinkedHashMap clear() Method
- Java LinkedHashMap clone() Method
- Java LinkedHashMap containsKey() Method
- Java LinkedHashMap get() Method
- Java LinkedHashMap isEmpty() Method
- Java LinkedHashMap putAll() Method
- Java LinkedHashMap remove() Method
- Java LinkedHashMap size() Method
- Java LinkedHashMap entrySet() Method
- Java LinkedHashMap keySet() Method
- Java LinkedHashMap values() Method
- Java LinkedHashMap getOrDefault() Method
- Java LinkedHashMap replace() Method
- Java LinkedHashMap replace(K key, V value) Method
- Java LinkedHashMap forEach() Method
- Java LinkedHashMap replaceAll() Method
- Java LinkedHashMap computeIfAbsent() Method
- Java LinkedHashMap merge() Method
- Java LinkedHashMap keySpliterator() Method
- Java LinkedHashMap valueSpliterator() Method
- Java LinkedHashMap entrySpliterator() Method
- Java LinkedHashMap valueStream() Method
- Java LinkedHashMap entryStream() Method
Java LinkedHashSet API Guides
- Java LinkedHashSet add() Method
- Java LinkedHashSet clear() Method
- Java LinkedHashSet contains() Method
- Java LinkedHashSet isEmpty() Method
- Java LinkedHashSet iterator() Method
- Java LinkedHashSet remove() Method
- Java LinkedHashSet size() Method
- Java LinkedHashSet addFirst() Method (Introduced in Java 21)
- Java LinkedHashSet addLast() Method (Introduced in Java 21)
- Java LinkedHashSet getFirst() Method (Introduced in Java 21)
- Java LinkedHashSet getLast() Method (Introduced in Java 21)
- Java LinkedHashSet newLinkedHashSet() Method (Introduced in Java 21)
- Java LinkedHashSet removeFirst() Method (Introduced in Java 21)
- Java LinkedHashSet spliterator() Method
- Java LinkedHashSet addAll() Method
- Java LinkedHashSet removeLast() Method (Introduced in Java 21)
- Java LinkedHashSet reversed() Method (Introduced in Java 21)
- Java LinkedHashSet containsAll() Method
- Java LinkedHashSet retainAll() Method
- Java LinkedHashSet removeAll() Method
- Java LinkedHashSet toArray() Method
- Java LinkedHashSet parallelStream() Method
- Java LinkedHashSet stream() Method
- Java LinkedHashSet forEach() Method
Java ConcurrentHashMap API Guides
- Java ConcurrentHashMap put() Method
- Java ConcurrentHashMap get() Method
- Java ConcurrentHashMap containsKey() Method
- Java ConcurrentHashMap containsValue() Method
- Java ConcurrentHashMap remove() Method
- Java ConcurrentHashMap size() Method
- Java ConcurrentHashMap isEmpty() Method
- Java ConcurrentHashMap keySet() Method
- Java ConcurrentHashMap values() Method
- Java ConcurrentHashMap putIfAbsent() Method
- Java ConcurrentHashMap replace() Method
- Java ConcurrentHashMap forEach() Method
- Java ConcurrentHashMap keys() Method
Java CopyOnWriteArrayList API Guides
- Java CopyOnWriteArrayList add() Method
- Java CopyOnWriteArrayList get() Method
- Java CopyOnWriteArrayList size() Method
- Java CopyOnWriteArrayList isEmpty() Method
- Java CopyOnWriteArrayList clear() Method
- Java CopyOnWriteArrayList indexOf() Method
- Java CopyOnWriteArrayList indexOf() Method
- Java CopyOnWriteArrayList lastIndexOf() Method
- Java CopyOnWriteArrayList addAll() Method
- Java CopyOnWriteArrayList remove() Method
- Java CopyOnWriteArrayList iterator() Method
Java CopyOnWriteArraySet API Guides
- Java CopyOnWriteArraySet add() Method
- Java CopyOnWriteArraySet remove() Method
- Java CopyOnWriteArraySet contains() Method
- Java CopyOnWriteArraySet size() Method
- Java CopyOnWriteArraySet isEmpty() Method
- Java CopyOnWriteArraySet clear() Method
- Java CopyOnWriteArraySet iterator() Method
- Java CopyOnWriteArraySet toArray() Method
- Java CopyOnWriteArraySet addAll() Method
- Java CopyOnWriteArraySet containsAll() Method
- Java CopyOnWriteArraySet removeAll() Method
- Java CopyOnWriteArraySet retainAll() Method
Java EnumMap API Guides
- Java EnumMap put() Method
- Java EnumMap get() Method
- Java EnumMap containsKey() Method
- Java EnumMap size() Method
- Java EnumMap isEmpty() Method
- Java EnumMap keySet() Method
- Java EnumMap values() Method
- Java EnumMap entrySet() Method
- Java EnumMap forEach() Method
- Java EnumMap getOrDefault() Method
- Java EnumMap putIfAbsent() Method
- Java EnumMap remove() Method
Java EnumSet API Guides
- Java EnumSet allOf() Method
- Java EnumSet noneOf() Method
- Java EnumSet of() Method
- Java EnumSet complementOf() Method
- Java EnumSet copyOf Method
- Java EnumSet add() Method
- Java EnumSet addAll() Method
- Java EnumSet contains() Method
- Java EnumSet containsAll() Method
- Java EnumSet remove() Method
- Java EnumSet removeAll() Method
- Java EnumSet retainAll() Method
- Java EnumSet clear() Method
Java IdentityHashMap API Guides
- Java IdentityHashMap put() Method
- Java IdentityHashMap putAll() Method
- Java IdentityHashMap get() Method
- Java IdentityHashMap containsKey() Method
- Java IdentityHashMap containsValue() Method
- Java IdentityHashMap entrySet() Method
- Java IdentityHashMap values() Method
- Java IdentityHashMap size() Method
- Java IdentityHashMap isEmpty() Method
- Java IdentityHashMap keySet() Method
Java PriorityQueue API Guides
- Java PriorityQueue add() Method
- Java PriorityQueue clear() Method
- Java PriorityQueue comparator() Method
- Java PriorityQueue contains() Method
- Java PriorityQueue forEach() Method
- Java PriorityQueue iterator() Method
- Java PriorityQueue offer() Method
- Java PriorityQueue peek() Method
- Java PriorityQueue poll() Method
- Java PriorityQueue remove() Method
- Java PriorityQueue removeAll() Method
- Java PriorityQueue removeIf() Method
- Java PriorityQueue retainAll() Method
- Java PriorityQueue size() Method
- Java PriorityQueue spliterator() Method
- Java PriorityQueue toArray() Method
Java ArrayDeque API Guides
- Java ArrayDeque add() Method
- Java ArrayDeque addAll() Method
- Java ArrayDeque addFirst() Method
- Java ArrayDeque addLast() Method
- Java ArrayDeque clear() Method
- Java ArrayDeque clone() Method
- Java ArrayDeque contains() Method
- Java ArrayDeque descendingIterator() Method
- Java ArrayDeque element() Method
- Java ArrayDeque forEach() Method
- Java ArrayDeque getFirst() Method
- Java ArrayDeque getLast() Method
- Java ArrayDeque isEmpty() Method
- Java ArrayDeque offer() Method
- Java ArrayDeque offerFirst() Method
- Java ArrayDeque iterator() Method
- Java ArrayDeque offerLast() Method
- Java ArrayDeque peek() Method
- Java ArrayDeque peekFirst() Method
- Java ArrayDeque peekLast() Method
- Java ArrayDeque poll() Method
- Java ArrayDeque pollFirst() Method
- Java ArrayDeque pollLast() Method
- Java ArrayDeque pop() Method
- Java ArrayDeque push() Method
- Java ArrayDeque remove() Method
- Java ArrayDeque removeAll() Method
- Java ArrayDeque removeFirst() Method
- Java ArrayDeque removeFirstOccurrence() Method
- Java ArrayDeque removeIf() Method
- Java ArrayDeque removeLast() Method
- Java ArrayDeque removeLastOccurrence() Method
- Java ArrayDeque retainAll() Method
- Java ArrayDeque size() Method
- Java ArrayDeque spliterator() Method
- Java ArrayDeque toArray() Method
Java Stack API Guides
- Java Stack empty() Method
- Java Stack peek() Method
- Java Stack pop() Method
- Java Stack push() Method
- Java Stack search() Method
Java Scanner API Guides
- Java Scanner close() Method
- Java Scanner delimiter() Method
- Java Scanner findAll() Method
- Java Scanner findInLine() Method
- Java Scanner hasNext() Method
- Java Scanner hasNextInt() Method
- Java Scanner hasNextLine() Method
- Java Scanner match() Method
- Java Scanner next() Method
- Java Scanner nextBigDecimal() Method
- Java Scanner nextBigInteger() Method
- Java Scanner nextBoolean() Method
- Java Scanner nextByte() Method
- Java Scanner nextDouble() Method
- Java Scanner nextFloat() Method
- Java Scanner nextInt() Method
- Java Scanner nextLine() Method
- Java Scanner nextLong() Method
- Java Scanner nextShort() Method
- Java Scanner tokens() Method
- Java Scanner useDelimiter() Method
Comments
Post a Comment
Leave Comment