Sample program of java
public static void main(String[] args) is the main method of a java program that starting point of any java program. Its syntax is public static void main(String[] args). We can only change the name of the String array argument that is args change to args1. System.out.println() is one type of java statement that is used to print the text on the console.
PROGRAM
public class sample{ //main method public static void main(String[] args) { // to display the string System.out.println("Hello World"); } }
0 Comments