Cover Page by Budi Kurniawan

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 5

Core Classes

Before discussing other features of object-oriented programming (OOP), let's examine several important classes that are commonly used in Java. These classes are included in the Java core libraries that come with the JDK. Mastering them will help you understand the examples that accompany the next OOP lessons.

The most prominent class of all is definitely java.lang.Object. However, it is hard to talk about this class without first covering inheritance, which we will do in Chapter 6, “Inheritance.” Therefore, java.lang.Object is only discussed briefly in this chapter. Right now we will concentrate on classes that you can use in your programs. We'll start with java.lang.String and other types of strings: java.lang.StringBuffer ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required