Objects and Classes
Object-oriented programming (OOP) works by modeling applications on real-world objects. The benefits of OOP 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 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 an object with the new keyword, how objects are stored in memory, how classes can be organized into packages, how to use access control to achieve encapsulation, how the Java Virtual Machine (JVM) loads and ...