Map Java Collection Tutorial

Map Stores values in key and value. map does not allow duplicate key. only one null key but any number of null values To synchronize the Map use. Collections.synchronizedMap(yourMapObject) Hashmap Hashmap allows random storage sequence is not maintained. Stores values in key and value. Hashmap is not synchronized. Collections.synchronizedHashset Hashmap does not allow duplicate key. Hashmap allows only one null…

Read More Read More

Java Collection -Set

<I>Set does not contain duplicates. randomly stores elements. does not permits null elements. How to make your list synchronised? Collections.synchronizedSet(yourSetObject) Classes  <C>TreeSet Sorts element by natural order. rest of the properties are same as specified by interface Set Internally it is implemented using the TreeMap.        Main purpose is for sorting the stores elements.        …

Read More Read More

Doubly Linked list in java

Doubly Linked List Tutorial in Java

This is just like a tip of the iceberg.I would strongly recommend to go through

Singly Linked List using java.

Singly Linked list using java Singly Linked List is created for adding the elements one after another where each Node is linked to the other Node sequentially. The operations covered in this post are      Append to the end      Add in the middle of linked list. Append to the end How we are going to create linked…

Read More Read More

Files Read by Multiple Thread

How to read each file on separate thread. Step 1:Get List of all files in the specified folder

    Step 2:Create Class which will display contents of file and implements runnable. Note that I have created constructor to pass the filelocation to the thread,

  Now read file logic will only read contents of file using java8…

Read More Read More