O'Reilly logo

Oracle Certified Associate, Java SE 7 Programmer Study Guide by Richard M. Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring the structure of a Java console program

Let's start with a simple Java program and then use it to explore many of the basic facets of Java. First, a Java application consists of one or more files located somewhere within a filesystem. The name of the files and their locations are both important, as we will see shortly.

Tip

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

A simple Java application

Our simple program defines a Customer class and then uses it in the CustomerDriver class as follows:

package com.company.customer; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required