//

How to check if key exists in a map

In order to check whether a key exists in a map you can use the following methods; containsKey() It check and return a boolean value get() It return the value if key is present else return null

Data Structures

Data structure is a way of organizing data so that it can be used efficiently. Some of commonly used Data Structure Arrays Linked Lists Stack & Queues Trees Graphs HashTable

Algorithms

A sequence of steps to perform a certain tasks is known as algorithm Eg: How to prepare tea?

HashMap in java

HashMap is an implementation of Map interface of collection framework which allows us to store elements in the key and value pair. The key should be unique and can have a null key. HashMap are not synchronized which means that they are not thread safe. Also, HashMap doesn’t store any order or insertion. The initial […]

Standalone Java Projects for Practice

Some of the small projects you can develop to learn java Create a server in java A basic chat application Console based scholle management system (student crud)

Append multiple ArrayList in Java

Suppose you have two or more array lists, and you have to append them one after another. In this scenario, you can use the addAll() method of array list list1.addAll(list2) Calling addAll() on your ArrayList and passing another array list as a parameter will append the later ArrayList to the former. Eg: ArrayList<Integer> list1 = […]