Section 8: Fundamental Classes in the java.lang Package (Chapter 10)
Study NotesThe java.lang.Math class defines many useful mathematical functions, whose purpose should be understood . Argument type, result type, and the effect of applying each of these functions should be known. Strings are immutable objects, that is, their contents cannot be changed. String manipulation operations in the String class return new String objects as the result of the operation. The indexing of characters used by string operations is important. StringBuffer implements a mutable sequence of characters. Most string buffer operations manipulate the character sequence directly. There is no inheritance relationship between the classes String and StringBuffer , and objects of these classes cannot be compared directly. Each primitive data type has a corresponding wrapper class that allows you to create immutable objects that represent primitive values. The methods toString() and type Value() can be called on wrapper objects to convert their value to a string or primitive values, respectively. The static wrapper class methods parse Type () and valueOf() convert a string to a primitive value or wrapper object, respectively. The static method get Type () in the Integer and Long classes can be used to determine values of system properties by name . The static method toHexString() can be used to create a string representation of an int or a long in the hexadecimal notation. |