How to write basic Java Programs

Amansingh Javatpoint
1 min readMay 1, 2021

--

In this section, we will learn how to write basic Java programs. But first we need to take care of the following requirement list.

To execute a Java program, one has to:

  • Install JDK
  • Set the jdk/bin path in the PATH environment variable.

Before executing any Java program, ensure the above two points without installing JDK execution of Java program is not possible.

Let’s create a Hello-World Java program.

Filename: HelloWorldExample.java

public class HelloWorldExample

{

public static void main(String[] args)

{

System.out.println(“Hello World”);

}

}

--

--

No responses yet