• Convert Stream to List in java
    31 December

    Java Stream to List

    In this post, we will see how to convert Stream to List in java. There are multiple ways to convert Stream to List in java. Using Collectors.toList() You can pass Collectors.toList() to Stream.collect() method to convert Stream to List in java. Stream’s collect method performs mutable reduction operation on elements of Stream and Collectors.toList() provides […]

  • 28 August

    A In-Depth guide to Java 8 Stream API

    In this post, we will see an in-depth overview of Java 8 streams with a lot of examples and exercises. Introduction You may think that Stream must be similar to InputStream or OutputStream, but that’s not the case. A Stream represents a sequence of elements supporting sequential and parallel aggregate operations. Stream does not store […]

  • Java 8 Method reference
    22 April

    Java 8 Method reference

    Java 8 has introduced a lot of new features such as lambda expressions, stream, Method references etc. In this post, we will see what are Method references and how can we use it. I will try to provide more examples rather than theory. 1. Introduction to Method Reference Method references are special types of lambda […]

  • wait(),notify() and notifyAll() in java
    22 October

    Why wait(), notify() And notifyAll() methods are in Object Class

    In this post, we will see why wait(), notify() And notifyAll() methods are in Object Class And Not in Thread Class. This is one of the most asked java multithreading interview questions. You might know that wait(), notify() And notifyAll() Methods are in Object class and do you know the reason for the same? Let’s […]

  • Java Interview questions
    22 May

    100+ Core Java Interview Questions and Answers for 2022

    Introduction In this post we will look into the most commonly asked Interview questions related to Java. We will take a look at the most common topics in Java for interviews and provide the answer to the questions in detail with examples to help you ace your next interview. We recommend following this post step […]

  • Difference between Runnable and Callable in java
    16 December

    Difference between Runnable and Callable in java

    Runnable and Callable interface both are used in the multithreading environment.Callable is available in java.util.concurrent.Callable package and Runnable in java.lang.Thread. Difference between Runnable and Callable interface in java Runnable was introduced in java 1.0 version While Callable is an extended version of Runnable and introduced in java 1.5 to address the limitation of Runnable. Runnable […]

  • Print sequence using 3 threads in java
    17 November

    Print Numbers Using Multiple Threads in Java

    In this post, we will see how to print numbers using multiple threads in java.It is similar to printing odd-even numbers using two threads in java. Problem You are given 3 threads. You need to print sequence using these 3 threads.You need to print in natural order up to MAX. For example: Let’s say you […]

  • 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 interview questions for 2 years experience
    08 November

    Core Java interview questions

    Core In this post, we are going to see Java interview questions for experienced. These are the most asked interview questions for freshers(0-3 years experienced). This question list will help you to crack java interview. I have already shared detailed answer over here before, you might find it helpful as well. I would like to […]