Chapter 4. Object Lessons
Two days ago, object-oriented programming was compared to beer because it's an acquired taste that might lead to disorientation, nausea, and an altered worldview.
Today's chapter offers a refill. You become reacquainted with this type of programming as you work with objects in Java.
Most of the things you do in the language are done with objects. You create objects, modify them, move them around, change their variables, call their methods, and combine them with other objects. You develop classes, create objects out of those classes, and use them with other classes and objects.
You work extensively with objects on this day. The following topics are covered:
Creating objects (also called instances)
Testing and modifying class ...
Get Sams Teach Yourself Java™ 2 Platform in 21 Days Professional Reference Edition 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.