O'Reilly logo

Java SE 7 Programming Essentials by Michael Ernest

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

Applying Data Types in Java Programming

In the examples in Chapter 1, you saw casual use of data types to help you understand Java class structure. Now we dig in a bit deeper to understand the two basic types of data we have in Java, objects and primitives. As you learn about them, you’ll get a better understanding of the rules that support them and the cases the drive their use.

We’ll also take our first look at two key Java classes, String and StringBuilder, which you’ll need quite frequently in everyday programming.

In this chapter, we’ll cover the following topics:

  • Creating, using, and destroying objects
  • Distinguishing between object references and primitives
  • Declaring and initializing variables
  • Default initialization of variables ...

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