COP 3502 Chapter Notes - Chapter 4: Escape Sequence, Escape Character, Substring
Document Summary
The focus of this chapter is to introduce mathematical functions, characters, string objects, and use them to develop programs. Java provides many useful methods in the math class for performing common mathematical functions. Method: a group of statements that performs a specific task. Methods in math class: trigonometric methods, exponent methods, and service methods (includes rounding, min, max, absolute, and random methods) Math constants: math. pi and math. e, and e, respectively. Math. sin(radians): returns the trigonometric sine of an angle in radians. Math. cos(radians): returns the trigonometric cosine of an angle in radians. Math. tan(radians): returns the trigonometric tangent of an angle in radians. Math. toradians(degree): returns the angle in radians for the angle in degree. Math. todegree(radians): returns the angle in degrees for the angle in radians. Math. asin(a): returns the angle in radians for the inverse of sine. Math. acos(a): returns the angle in radians for the inverse of cosine. Math. atan(a): returns the angle in radians for the inverse of tangent.