• Java tricky interview questions
    06 June

    Top 10 Java tricky interview questions

    In this tutorial, we will see top 10 Java interview questions. If you can solve these questions, it will help you to understand java programming better.You can also go through top 50 core java interview questions and answers. Question 1: What will be the output of below program: [crayon-6649a095d1968920449938/] Question 2: Guess the output of below […]

  • 05 June

    Java newSingleThreadExecutor example

    In this tutorial, we will learn about Executor’s newSingleThreadExecutor factory method. In the last tutorial, I have shared an introduction to ThreadPoolExecutor. If you are not aware of concepts of ThreadPoolExecutor, you should go through that first. Executor’s newSingleThreadExecutor factory method : This method returns thread pool executor which executes one task at a time.If […]

  • 29 May

    Java ScheduledThreadPoolExecutor Example

    There are multiple ways to schedule a task in java. We have already Java timer to schedule a task but the problem with timers task is that you can execute one task at a time.So if the current task takes longer subsequent job will be delayed. In this scenario, you can use Java ScheduledThreadPoolExecutor.This class […]

  • Java FutureTask example
    28 May

    Java FutureTask example

    In this tutorial, we will see about Java FutureTask example. FutureTask class has been introduced in JDK 5 with Executor Framework. FutureTask class is the concrete implementation of the Future object and provides methods for start and cancel the task.It also provides method to see if the computation is done or not. We can query […]

  • 28 May

    Introduction to Java Programming Language

    Introduction Java is a programming language and computing platform which serves as a general-purpose language for developers to create modular programs and reusable code. With its Write Once Run Anywhere principle, Java is now of the most widely used and recommended programming language for developing desktop as well as web applications in today’s digitized world. […]

  • 28 May

    Java Hello World Program

    Introduction In this post, we will see how to write your first java program. This post is intended only for java beginners to acquaint them with the steps to write a simple java program. Simply put, we will write a code that outputs "Hello World!" to your console/screen. For Folks having some knowledge in other […]

  • 28 May

    Constructor in java

    Constructor in java is block of code which allows you to create instance of the object. It does not have return type. It has two main points Constructor name should be same as class Constructor should not have any return type else it will be same as method. There are three types of Constructor in Java. […]

  • 27 May

    Polymorphism in java with example

    In this tutorial, we will see about Polymorphism in java. Polymorphism in java is one of core Object oriented programming concepts with Abstraction, encapsulation, and inheritance. Polymorphism means one name many forms. In Java, polymorphism can be achieved by method overloading and method overriding. There are two types of polymorphism in java. Compile time polymorphism. Run […]

  • 27 May

    What is Object and Class In Java?

    Introduction In this post, we will learn about Object and Class in Java. These topics form the core concepts and the building blocks of Object-Oriented Programming for a beginner. As Java is an Object-Oriented Programming language, we design our program and represent/store key entities using Objects and classes. What is Class In Java? A class is a […]