- To print Hello World
Output: Hello World
public class MyFirstJavaProgram {
public static void main(String []args) {
System.out.println("Hello World");
}
}
Hello WorldProgram
It's a simplest program code
Whatever you want to show in the output screen just type it after System.out.println
or System.out.print
inclosed with ()
inside " "
(double quote)
System.out.println("Whatever you want to print"); //to print anything & point to next-line
System.out.print("Whatever you want to print"); //to print anything & point to same-line
Concept
Coming Soon !
QuickIn order to succeed you must fail, so that you know what not to do the next time.