Showing posts with label Collections. Show all posts
Showing posts with label Collections. Show all posts

IdentityHashMap in Java

IdentityHashMap implements Map interface as same as HashMap class. This class has been added from Java 1.4 and used very minimal across the programmers. Basically IdentityHashMap holds special implementation of Map interface which won't...

PriorityBlockingQueue in Java

In our last tutorial we have see about PriorityQueue and how its used in Java with simple example. In this tutorial we will see about PriorityBlockingQueue and it works and also the difference between...

PriorityQueue in Java

PriorityQueue is unbounded priority queue based on priority heap.  Basically PriorityQueue are ordered according to natural ordering or by a Comparator provided at queue construction time, depending on which constructor is used.  Another important...

Reverse LinkedList

This is one of the interview question which asked in recent interview like need to create a LinkedList and need to reverse those values in same linkedList without using addition list. We can make...

TreeSet

In our earlier tutorials we have seen about LinkedHashMap and LinkedHashSet with simple examples. Now lets see about TreeSet and its difference between HashSet and also how its works. First lets discuss about the...

LinkedHashSet

In our previous tutorial we have discussed about LinkedHashMap and how its works. In this tutorial we will see about LinkedHashSet and what is the difference between HashMap and how its works. Lets list...

LinkedHashMap

LinkedHashMap is under Java Collection API and it implements Map interface. LinkedHashMap also works as same as HashMap with only 1 difference. Lets see the properties of LinkedHashMap class in Java It works based...