23.11.2017 Views

java_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Java<br />

Example<br />

public class Test{<br />

public static void main(String args[]){<br />

double degrees = 45.0;<br />

double radians = Math.toRadians(degrees);<br />

System.out.format("The value of pi is %.4f%n", Math.PI);<br />

System.out.format("The tangent of %.1f degrees is %.4f%n", degrees,<br />

Math.tan(radians));<br />

}<br />

}<br />

This will produce the following result:<br />

The value of pi is 3.1416<br />

The tangent of 45.0 degrees is 1.0000<br />

Java – asin() Method<br />

Description<br />

The method returns the arcsine of the specified double value.<br />

Syntax<br />

double asin(double d)<br />

Parameters<br />

Here is the detail of parameters:<br />

<br />

d -- A double data types.<br />

Return Value<br />

<br />

This method returns the arcsine of the specified double value.<br />

107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!