HashMap in Java – How it Works?

Learn-Java-Featured-Image

Hashmap in Java is a class that implements Java map interface and found inside java.util package. It stores data based on key and value. It stores elements in an unsorted manner, which means it does not return elements in the order they’re inserted. Hashmap is denoted by “Hashmap<Key, Value>” Points to remember: Data is inserted …

Read more

Map Interface In Java

Learn-Java-Featured-Image

Java Map stores elements in the form of Key-Value pair where it maps keys to values. A map cannot contain duplicate keys and each key can map to at most one value where each pair of key-value is known as an Entry. If you want to perform operations based on key-value pair then Java Map …

Read more

LinkedList in Java

Learn-Java-Featured-Image

LinkedList in Java is a doubly-linked list implementation of the List and Deque interfaces and it is a part of the Collection framework. Java LinkedList is a class that extends AbstractSequentialList and implements List and Deque interface. Let’ see the implementation in Java: Java LinkedList can also be used as List, Queue, or Deque because …

Read more

ArrayList in Java

Learn-Java-Featured-Image

ArrayList in Java is a dynamic, resizable list of objects and utilizes an array data structure. Java ArrayList is a part of the Collection framework and it implements List Interface. Internally Java ArrayList uses an Array object to store elements dynamically or we can say Java ArrayList is backed with an array data structure inside …

Read more

Java List – List in Java

Learn-Java-Featured-Image

As you know Arrays are inflexible and fixed-size data structure whereas List in Java is flexible, dynamic, and ordered collection. Java List is a part of the collection framework where you can access List elements using some default methods. It gives you the functionality to access elements by their index, add, remove, and search elements. …

Read more