Creating the Saluton Program

The first Java program that you create will be an application that displays a traditional greeting from the world of computer science, “Saluton mondo!”

Beginning the Program

Using your word processor, begin your Java programming career by entering each line from Listing 2.1. Don't enter the line number and colon at the beginning of each line—these are used in this book so that specific line numbers can be referred to.

Listing 2.1. The Saluton Program
1: class Saluton {
2:     public static void main(String[] arguments) {
3:         // My first Java program goes here
4:     }
5: }

Make sure to capitalize everything exactly as shown, and use your spacebar or Tab key to insert the blank spaces in front of some lines. When you're ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.