O'Reilly logo

Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035) by Marcus Green, Bill Brogden

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

Structure of Java Programs

Programming in Java consists of writing source code that defines one or more classes. Because Java is completely object-oriented, all Java code is inside a class definition. When a Java program runs, it uses these class definitions to create objects that contain all of the program variables and instructions.

In Java, there is no such thing as a global variable or any function that is not part of a class, and therefore an object. Java groups the various utility calls you might expect to find in a system library into classes, frequently as static methods. The implications of the static keyword are discussed in Chapters ...

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