Chapter 2, “Language Fundamentals”

Java programs are composed of declarations of classes and interfaces.

Classes define variables, which provide named access to data; methods, which perform actions that consist of operations on the data; and constructors, which create instances of those classes, referred to as objects. Classes can also define static or non-static initializers.

Interfaces define collections of methods that are implemented by classes.

Java programs are written using one or more compilation units, which are Java source code files. Every source code file consists of the name of a class or interface followed by the .java extension. Because Java identifiers are case sensitive, source code filenames are also case sensitive.

Each source ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams 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.