Rabu, 23 Oktober 2024

Hello World In Java

  1. Type this following Java source code in your IDE:
    class MyFirstJavaProgram {
      public static void main(String args[]) {
        // Prints "Hello, World" in the terminal window
        System.out.println("Hello World");
      }
    }
    //As main method is static no need to create a object for class MyFirstJavaProgram
  2. Save as MyFirstJavaProgram.java.
  3. Compile and run Java source code from above.

Related Post


Tidak ada komentar:

Posting Komentar

Various Other Posts