• 10 November

    Java Convert Array to List

    In this post, we will see how to convert array to list in java. There are may ways to convert array to list: By using Arrays.asList(): This is an easy method to convert Array into list.We just need to pass array as parameter to asList() method.It is a Static method available in Arrays class so, […]

  • 10 November

    Java convert List to Array

    In this post, we will see how to convert List to Array in java. There are many ways to convert List to Array in java Using toArray() method We can use toArray() method to convert List to String. We can either pass a array of size as List’s length or we can pass empty array. […]

  • Solid principles in java
    09 November

    SOLID Principles in Java

    In this post, we will see 5 SOLID Principles in Java. Robert C. Martin gave five objected oriented design principles, and the acronym S.O.L.I.D is used for it. Each letter of this acronym talks about principles in Java. When you use all the principles of S.O.L.I.D in a combined manner, it becomes easier for you […]

  • Java 8 Parallel Stream
    07 November

    Java Parallel Stream

    In this post, we will see about Parallel Stream in java. Java Parallel Stream introduction Java 8 introduces the concept of parallel stream to do parallel processing. As we have more number of cpu cores nowadays due to cheap hardware costs, parallel processing can be used to perform operation faster. Let’s understand with help of […]

  • 04 November

    How to convert String to Double in Java

    With the introduction of different data types, the need for conversion of one data type to another has come into being. In this article, we are going to see how we can convert from a String data type into Double data type. Conversion Modes There are two ways in which String data can be converted […]

  • 04 November

    How to convert String to int in Java

    In this article, we are going to see how we can convert from a String data type into integer data type in Java. Conversion Modes There are two ways in which String data can be converted into integer. They are: Using the static method parseInt(String) of the java.lang.Integer wrapper class Using the static method valueOf(String) […]

  • 04 November

    How to create list of lists in java

    In this posts, we will see how to create a list of lists in java. You can easily create a list of lists using below syntax List<ArrayList<String>> listOfLists = new ArrayList<ArrayList<String>>(); or ArrayList<ArrayList<String>> listOfLists = new ArrayList<ArrayList<String>>(); One of the Usecase This is generally useful when you are trying to read a CSV file and […]

  • 04 November

    Can we overload main method in java

    In this post, we will see about "Can we overload main method in java".This is one of the most asked Core java interview questions. Yes, we can overload main method in java but when you run your program, JVM will search for public static void main(String[] args) and execute that method. Overload main method in […]

  • 02 November

    Dynamic method dispatch in java

    In this post, we will about Dynamic method dispatch which is also referred as run time polymorphism. Dynamic Method Dispatch Dynamic method dispatch is a technique by which call to a overridden method is resolved at runtime, rather than compile time.When an overridden method is called by a reference, then which version of overridden method […]