Simple Java Program : Lets look at the simplest Java program which prints Hello World onto the output screen. Every Java program needs this structure and with out this the program can not be successfully executed.
Please note that every program we will be discussing in Merit Campus, will contain the following sections.
Hello World Program
Every Java program contains the following structure.
In this structure(or format), only class-name, program-content and args will be different from program to program. The class-name will be the name of that program. program-content is where we include the code. This code will be executed when we run the program. args is the name of the variable to access the input parameters for the program. Although args can be called as s or arguments or input or some other name, it is a common practice to call it args or s.
public static void main(String args)
In this example, we have called class-name as
The words used like
THINGS TO TRY
Dependent Topics : JDK JRE JVM JIT - Java Compiler