O'Reilly logo

Java 7: A Beginner's Tutorial (Third Edition) by Budi Kurniawan

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

Object-oriented programming (OOP) works by modeling applications on real-world objects. The benefits of OOP, as discussed in Introduction, are real, which explains why OOP is the paradigm of choice today and why OOP languages like Java are popular. This chapter introduces you to objects and classes. If you are new to OOP, you may want to read this chapter carefully. A good understanding of OOP is the key to writing quality programs.

This chapter starts by explaining what an object is and what constitutes a class. It then teaches you how to create objects in Java using the new keyword, how objects are stored in memory, how classes can be organized into packages, how to use access control to achieve encapsulation, ...

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