Skip to content

Java Types and Syntax

Estimated time to read: 1 minute

Creating Java Statements

Statements provide an application with its functionality.

Java statements end with a semi-colon (;)

Structure of Java Files

Most Java files will never run by themselves as Java requires that code is always within a class. Only applications that include an entry point such as the "main" method will execute by themselves.

If a class file is run, that does not include a "main" method, Java will return an error.

A Java application is essentially a Java "class" with a "main" method.