O'Reilly logo

Core Java™, Volume I–Fundamentals, Eighth Edition by Gary Cornell, Cay S. Horstmann

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

Chapter 4. Objects and Classes

INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING

USING PREDEFINED CLASSES

DEFINING YOUR OWN CLASSES

STATIC FIELDS AND METHODS

METHOD PARAMETERS

OBJECT CONSTRUCTION

PACKAGES

THE CLASS PATH

DOCUMENTATION COMMENTS

CLASS DESIGN HINTS

In this chapter, we

• Introduce you to object-oriented programming;

• Show you how you can create objects that belong to classes in the standard Java library; and

• Show you how to write your own classes.

If you do not have a background in object-oriented programming, you will want to read this chapter carefully. Thinking about object-oriented programming requires a different way of thinking than for procedural languages. The transition is not always easy, but you do need ...

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