2 Understanding Objects in Java

Java is an object-oriented language. This means that most of the data manipulated by programs are contained in objects. Objects contain both state and operations; the operations are called methods. Programs interact with objects by invoking their methods. The methods provide access to the state, allowing using code to observe the current state of an object or to modify it. Sidebar 2.1 provides information about the origins of Java.

This chapter provides some basic information about Java and its support for object-oriented programming and design. We shall concentrate primarily on the language semantics, that is, on the meaning of constructs in the language. For a complete, detailed description of the language, ...

Get Program Development in Java: Abstraction, Specification, and Object-Oriented Design 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.