Working with Numbers
In Java numbers are represented by the primitives byte, short, int, long, float, double and their wrapper classes, which were explained in Chapter 5, “Core Classes.” Conversion from a primitive type to a wrapper object is called boxing and from a wrapper object to a primitive is called unboxing. Boxing and unboxing are the first topic in this chapter. Afterward, this chapter explain three issues you have to deal with when working with numbers, parsing, formatting and manipulation. Number parsing is the conversion of a string into a number and number formatting deals with presenting a number in a specific format. For instance, 1000000 may be displayed as 1,000,000.
To conclude, this chapter show how to perform ...