Member-only story

Welcome to Java

How to write a simple java program

Nipuni Arunodi
2 min readOct 12, 2020
Photo by Michiel Leunens on Unsplash

Name of class

Begin & End

Main Method

Java will perform the commands under this method.

If you type the first part of the as “ Public static void …” your program will not work.

Semicolon

Indicates the end of a command

Print Command in Java

Whatever in quotations will be printed as it is.

Compiling a Java Program

  • To compile your Java Program use the javac tool.
  • The compiler would create java byte code.

Running a Java Program

  • To run your Java Programs you need to call the Java Interpreter.

--

--

No responses yet