My First Program In Java
In this section, you will learn how to write the simple program of java. hello world!
In this section, you will learn how to write the simple program of java. hello world!
In this page, we will learn how to write the simple program of java. We can write a simple hello java program easily after installing the JDK.
To create a simple java program, you need to create a class that contains main method. Let's understand the requirement first.
For executing any java program, you need to
MyFirstJavaProgram {
public static void main(String []args) {
System.out.println("Hello World");
}
}
Hello World
Parameters used in the first java program
Let's see what is the meaning of class, public, static, void, main, String[], System.out.println().
First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.
Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.