Basic mathematical concepts and computation in Java.
While advanced mathematics is generally not required for general-purpose programming, an understanding of arithmetic computations, exponents & roots, logarithms, and basic algebra is an essential part of a solid foundation for programming. When supplemented by a few key concepts from number theory, set theory, probability, and trigonometry, such an understanding can dramatically expand the set of career paths (and career longevity) available to a programmer.
Summarized in the following pages are the Java data types (those defined in the language, and those provided by the standard library) used in mathematical computations, along with mathematical concepts and computations you may encounter in the assignments and projects of this bootcamp. Most of these are defined in mathematical terms, and accompanied by short code snippets.
java.lang
, java.math
, java.util
, and java.util.stream
packages of the Java standard library. Since all classes and interfaces contained directly in the java.lang
package are automatically imported by the Java compiler, these classes can be referenced directly without an import
statement. Classes and interfaces in other packages must be imported, or referenced via fully-qualified names; however, for the sake of clarity and brevity, this requirement is ignored in the code snippets here.