Summary

   

Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 10.  Java Classes


Java provides objects that wrap all primitive types available in the Java programming language; these are referred to as wrapper classes. The numeric wrapper classes provide methods for converting strings to numbers and numbers to strings, and for converting one primitive data type to another.

The String class is a specialized class that shares the common characteristic of immutability with wrapper classes. Furthermore, Java maintains strings in a string table to optimize the amount of text storage in a program, but constructing and modify strings have the strange side effect of inadvertently creating unwanted temporary strings. To combat this, Java provides the StringBuffer class to manipulate strings outside of the string table. Java provides prewritten string utility classes to help you.

The next chapter looks at more predefined classes and in particular those used for storing and maintaining data.


       
    Top
     



    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net