Core java
- 29 April
HashMap in java
HashMap is hash table based implementation of Map interface. It stores entry in key-value pairs. It maps keys to values. It is one of the most used Collection. Java HashMap HashMap implements Map an interface that maps a key to value. It is not synchronized and is not thread-safe. Duplicate keys are not allowed One […]
- 29 April
TreeMap in java with examples
TreeMap class implements Map similar to HashMap. Some important points about TreeMap: TreeMap implements Map interface and extends HashMap class. TreeMap is implemented using Red black tree based NavigableMap. TreeMap is ordered collection and store its elements in natural ordering of keys. Key which you would like to put in TreeMap must implement Comaparable interface or you can […]
- 28 April
LinkedHashMap in java
LinkedHashMap is a Hashtable and linked list-based implementation of Map interface, with predictable insertion order. It maintains double linked list of all its entries, that’s how it differs from HashMap. Java LinkedHashMap Some points about LinkedHashMap LinkedHashMap implements Map interface and extends HashMap class. LinkedHashMap maintains insertion order, so when you will be able to […]
- 22 April
How to calculate difference between two dates in java
In this post, we will see how to calculate difference between two dates. Sometimes we have requirement to find no. of days between two dates or no. of hours between two dates. Java Program: [crayon-67441f757fbf3167252039/] When you run above program, you will get following output: [crayon-67441f757fbfd542160825/]
- 12 April
Java Collections interview questions and answers
In this post, I am going to share some of logical java Collections interview questions which will help to understand Collections concepts better. For an extensive list of java programs, please go to Java interview programs. Question 1: What can be output of below code : [crayon-67441f757fe0f422236075/] options are :Â A)France France India B)India India […]
- 01 April
How to check if linked list is palindrome in java
In this post, we will see how to check if linked list is palindrome or not. Java Linked List Interview Programs: How to reverse a linked list in java How to reverse a linked list in pairs in java How to find middle element of linked list in java How to detect a loop in […]
- 01 April
Java program to reverse linked list in pairs
If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. This is one of popular interview question. In this post, we will see how to reverse linked list in pairs. Java Linked List Interview Programs: How to reverse a linked list in java How to reverse […]
- 28 March
AngularJS Restful web service example using $http
This post is in continuation with AngularJS web services tutorial Introduction to web services Web services interview questions SOAP web service introduction RESTful web service introduction SOAP web service example in java using eclipse JAX-WS web service eclipse tutorial JAX-WS web service deployment on tomcat Create RESTful web service in java(JAX-RS) using jersey RESTful web […]
- 18 February
Working with formulas in excel using Apache POI in java
Java Apache POI tutorial: Read excel files in java using POI Write excel files in java using POI Working with formula in excel using POI How to set style in excel using POI In this post, we will see how to set and evaluate formulas in excel using Apache POI. Set formula for a cell: […]