Chapter 10. Fundamental Classes

Exam Objectives

  • Write code using the following methods of the java.lang.Math class: abs(), ceil(), floor(), max(), min(), random(), round(), sin(), cos(), tan(), sqrt().

  • Describe the significance of the immutability of String objects.

  • Describe the significance of wrapper classes, including making appropriate selections in the wrapper classes to suit specified behavior requirements, stating the result of executing a fragment of code that includes an instance of one of the wrapper classes, and writing code using the following methods of the wrapper classes (e.g., Integer, Double, etc.):

    • doubleValue()

    • floatValue()

    • intValue()

    • longValue()

    • parseXxx()

    • getXxx()

    • toString()

    • toHexString()

Supplementary Objectives

  • Understand the functionality inherited by all classes from the Object class, which is at the top of any class hierarchy.

  • Write code for manipulating immutable and dynamic strings, using the facilities provided by the String and StringBuffer classes, respectively.