• 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-662fcd251897d563408902/] When you run above program, you will get following output: [crayon-662fcd2518985900618669/]

  • 16 April

    Delete a node from binary search tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post, we will see how to delete a node from binary search tree. There are two parts to it. Search the node After searching that node, delete the node. There are three cases which we […]

  • 15 April

    Spring Restful web services CRUD example

    In this post, we are going see Spring Restful web services CRUD example. Web service Tutorial Content: Introduction to web services Web services interview questions SOAP web service introduction RESTful web service introduction Difference between SOAP and REST web services SOAP web service example in java using eclipse JAX-WS web service eclipse tutorial JAX-WS web service […]

  • 15 April

    Binary search tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. Binary search tree is a special type of binary tree which have following properties. Nodes which are smaller than root will be in left subtree. Nodes which are greater than root will be right subtree. It should […]

  • 15 April

    Find minimum and maximum elements in binary search tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post, we will see how to find minimum and maximum elements in binary search tree. Finding minimum element: Minimum element is nothing but leftmost node in binary search tree, so traverse left until you get […]

  • 14 April

    jQuery Selector examples

    jQuery selectors are important part of jQuery. It is used to select DOM elements and manipulate it. Syntax: It should start with $ followed by parenthesis. For below html, you want to hide text on click of button. So you need to select button with id “myButton” as $(“#myButton”) and div with id helloWorldDiv as […]