7Delving Further into Object-Oriented Concepts

WHAT YOU WILL LEARN IN THIS CHAPTER:                

  • What annotations are
  • What overloaded methods are
  • How to use the this keyword
  • What information hiding or encapsulation is
  • What class inheritance and polymorphism mean
  • What interfaces are and what they do
  • How to organize your classes into packages
  • How garbage is collected in Java

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/go/beginningjavaprogramming on the Download Code tab. The code is in the Chapter 7 download and individually named according to the names throughout the chapter.

The first half of this book covered the basics of Java and Object-Oriented Programming. Some of the chapters provided the tools or techniques needed to start building more complex programs. Building on that foundation, you’re ready to move on to these more advanced concepts. This chapter expands on Chapter 4 to increase your knowledge of the principles of Object-Oriented Programming. The three main topics covered here are information hiding, inheritance, and interfaces. However, there are also several other ideas that are discussed, including method overloading, packages, garbage collection, and annotations. After completing this chapter, you will have the tools you need to create organized and advanced Java applications. The rest of the book helps you put object-oriented principles into practice with increasing functionality.

Get Beginning Java Programming 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.