Chapter 15. Primitive Variable Wrapper and String Classes

The previous chapter provided an overview of some of the classes and interfaces in the Java APIs. In this chapter we will explore in more detail some of the classes from the java.lang package that you are likely to use in your scientific or engineering programming work. In Chapter 8 we discussed that there are two general types of Java variables—primitive variables that store a single value and reference type variables that contain references to arrays or to objects.

The two variable types are treated differently by Java. You usually cannot mix and match. For instance, you cannot pass a primitive variable to a method that expects a reference type argument. There may be times when you want ...

Get Technical Java™: Developing Scientific and Engineering Applications 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.