• 01 July

    Difference between openSession and getCurrentSession in Hibernate

    You might know there are two ways to create or get session in hibernate. We have below two methods in SessionFactory class to create a session. Tutorial Content: Introduction to hibernate framework Hibernate hello world example in eclipse Difference between openSession and getCurrentSession Hibernate one to one mapping example Hibernate one to many mapping example […]

  • 26 June

    Difference between SOAP and REST web services in java

    We have already seen SOAP web services and RESTful web services in detail before. In this post, we are going to see differences between SOAP and REST web services. SOAP vs REST web services Parameter SOAP REST Acronym SOAP stands for simple object access protocol REST stands for REpresentational State Transfer Protocol vs Architectural style […]

  • Web services interview questions
    24 June

    Top 20 Web services interview questions

    Web services interview questions are most asked questions if you are applying for software developer role. In this post, we will see multiple web services interview questions. 1. What are web services? Web services are ways of communication between two application over network. It allows you to expose business logic using API. For example: Lets […]

  • Restful web services interview questions
    22 June

    Restful web services interview questions

    Restful web services are very popular now a days because it is very simple to implement and less time consuming. In this post, we are going to see restful web services interview questions with answers. 1. What is REST? REST is an architectural style which was brought in by Roy Fielding in 2000 in his […]

  • 19 June

    Can We Have Try without Catch Block in Java

    In Java, it’s possible to use a try block without a catch block, but it must be followed either by a finally block or be part of a try-with-resources statement. Let’s see both cases with the help of examples: 1. try-finally Structure You can use a try block with a finally block. As you may […]

  • 09 June

    Spring autowiring by constructor

    Spring autowiring by constructor is similar to autowiring by type but it is applied to constructor argument. If more than one bean property matches, then it throws fatal exception. Below digram will make it clear: For example: I am taking example of autowire by “constructor” here.It will be almost same as Dependency injection via setter method with […]

  • 07 June

    Daemon thread in java with example

    Daemon threads are low priority background threads which provide services to user threads. It’s life depends on user threads. If no user thread is running then JVM can exit even if daemon threads are running. JVM do not wait for daemon threads to finish. Daemon threads perform background tasks such as garbage collection, finalizer  etc. […]

  • 03 June

    How to remove non-ascii characters from a string in java

    In this post, we will see how to remove non ascii character from a string in java. Sometimes, you get non-ascii characters in String and you need to remove them. We will use regular expressions to do it. Java program to remove non-ascii characters: [crayon-6782914e9478a494156005/] When you run above program, you will get below output: […]

  • 03 June

    Convert HashMap to ArrayList in java

    In this post, we will see how to convert HashMap to ArrayList in java. Many times, you need to store keys or values into ArrayList or Store HashMap’s Node objects in ArrayList. HashMap and ArrayList both are the most used data structure in java and both have different Hierarchy. Here are the ways to convert […]