Skip to content

Instantly share code, notes, and snippets.

@jicee13
Last active February 5, 2019 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jicee13/a7557a364df690deca85ec4b3ee8c0b7 to your computer and use it in GitHub Desktop.
Save jicee13/a7557a364df690deca85ec4b3ee8c0b7 to your computer and use it in GitHub Desktop.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World.");
}
}

To Ensure Java is Installed Correctly

  1. Download and save HelloWorld.java under your Desktop folder
  2. Open CMD/Terminal
  3. cd into your Desktop cd Desktop/
  4. Compile the Java program javac HelloWorld.java
  5. Run Java program java HelloWorld
  6. Expected Output: Hello World.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment