Chapter    7

Exploring the Basic APIs Part 1

The standard class library’s java.lang and java.math packages provide many basic APIs, which are designed to support language features. You have already encountered a few of these APIs, such as the Object and String classes and the Throwable class hierarchy. In this chapter I introduce you to those basic library APIs that pertain to mathematics, string management, and packages.

Exploring the Math APIs

In Chapter 2 I presented Java’s +, -, *, /, and % operators for performing basic arithmetic on primitive-type values. Java also provides classes for performing trigonometry and other advanced math operations, representing monetary values accurately, and supporting extremely long integers for use in RSA ...

Get Learn Java for Android Development, Second Edition 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.