O'Reilly logo

Just Java™ 2 by Peter van der Linden

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 2. Introducing Objects

  • Downloading and Compiling Java

  • What Is a Class?

  • What Is an Object?

  • Java Digital Clock Program

  • Summary

  • Exercises

  • Some Light Relief—Napster and LimeWire

Here's where we get to grips with a real Java program. Follow the steps in Appendix A to download a Java compiler. Then you can type in source code and test examples as we go along.

The chapter presents some basics of Object Oriented Programming (OOP). We'll explain exactly what language designers mean by a type, and relate that to the objects in OOP. We'll develop a type called Timestamp, then add a couple of other types to turn it into a complete program. Along the way, we'll clarify the super-important distinction between “an object” and “a reference ...

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