• 24 September

    Increment for Loop by 2 in Java

    In this post, we will see how to increment for loop by 2 in Java. There are several looping statements available in Java and one of them is for loop in java. There are three parts of for loop. Initialization Condition Increment or decrement [crayon-63350a63c4362243765640/] Initialization: Initialization statement executes at start of loop only one […]

  • 20 September

    Return ArrayList in Java

    This article discusses cases of returning an ArrayList in Java from a method. An ArrayList in Java is a collection of elements of the same data type under a single variable name. In different cases, you can return an ArrayList from a method in Java. These cases are as given below. Returning ArrayList from a […]

  • Check if Object is null Java
    14 March

    Check if Object Is Null in Java

    An object in Java is an instance of a class. It is a real entity existing in the memory opposite to the class that acts as a blueprint for the object. The object represents data and methods for a particular entity that are defined by the class. In this article, you will learn to check […]

  • How to print multiple variables in java
    31 January

    How to Print Multiple Variables in Java

    In this post, we will see how to print multiple variables in java. Ways to Print Multiple Variables in Java Here are two primary ways to print multiple variables in java. Using System.out.print You can use System.out.println to print two String variables in java as below: [crayon-63350a63c6672316772994/] Output: Country: India Capital: Delhi As you can […]

  • What is == in java
    01 December

    What is == in java

    In this tutorial, we will learn what is == in Java as it is a common lexeme that we will use while developing applications. The == lexeme can be confused with = which is another lexeme of the Java language and we will also learn in detail how the two differ to avoid issues such […]

  • Multiple classes in one file in Java
    18 October

    Multiple classes in one file in Java

    In this post, we will see how to have multiple classes in one file in java. Introduction You need to have any number of classes in a single Java file, but there is a restriction that you can declare only one Java class as public modifier with the main() method and declare (without public) for […]

  • Break out of nested loop in java
    22 July

    How to break out of nested loops in Java

    In this post, we will see how to break out of nested loops in Java. Using break (will break inner loop) It is very important to understand how nested loops work to ensure that applying break will output the desired result. If you are a novice with nested loops, I am going to make the […]

  • public static void main(String args[]) - Java main method
    11 June

    public static void main(String[] args) – Java main method

    If you have worked with Java programs before, you know that all Java programs start by running the main() method(public static void main(String[] args)). The main() method is the entry point. The signature of the main method is fixed, and each portion of the statement has significance. Why is the main method so important? The […]

  • Java projects for beginners
    30 April

    Top 20 Java Projects for Beginners

    This tutorial provides the top 20 java projects for beginners for practice. These projects will help you to learn java quickly and efficiently.