Lessons

Java tutorial

Java Introduction

Java is a general-purpose language used for applications, services, and Android software. A Java program is text that a compiler turns into instructions the Java platform can run.

JavaGuide starts with the words and patterns you will see in almost every program. The samples stay short on purpose.

Example

Edit the code and run it again. This runner stays in your browser and covers the syntax used in these lessons.

Output

Run the example to see output here.

What this code does

The file declares a class named Main. When the program starts, Java calls main, and the two println calls each write one line of text.