Java Basics
- 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 […]
- 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-6289212f49a79234097793/] Output: Country: India Capital: Delhi As you can […]
- 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 […]
- 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 […]
- 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 […]
- 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 […]
- 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.
- 08 March
How to end program in java
Ho In this post, we will see how to end program in java. You can use System.exit(0) to end program in java. Using System.exit() to end java program You can use exit() method of System class to end java program. System.exit() causes Java virtual machine to exit and terminate the current process. You can call […]
- 25 September
Reference Variable in Java
In this post, we will see about Reference variable in java. Reference variable A variable that holds reference of an object is called a reference variable. Variable is a name that is used to hold a value of any type during program execution. If the type is an object, then the variable is called reference […]