Chapter 9. The java.lang Package

OBJECTIVES

This chapter helps you prepare for the exam by covering the following objectives from the “The java.lang Package” section of the Sun testing objectives.

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

  • You need to know what sort of input these methods take and how to construct a valid Java expression using them. Be sure you know the rules these methods follow for various input conditions.

Describe the significance of the immutability of string objects.

  • Remember that when you are manipulating strings, a string object cannot be changed after it is created. This is frequently a cause for error ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams 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.