• Skip to primary navigation
  • Skip to content

GitopsCentral

  • Home
  • Courses
  • Roadmap
  • About
  • Log In
  • Sign Up

Hello, World Java

June 1, 2019 by shaik zillani

Let’s write a java hello, world! program and execute it from command line.

Program

class Hello {  
    public static void main(String args[]){  
      System.out.println("Hello, World!");  
    }  
} 

Now, Let’s try to compile it using javac and execute it using javacommand as shown below,

javac Hello.java
java Hello

Output

Hello, World!

java

© Copyright 2016-2025 gitopscentral · All Rights Reserved ·