atan() Method in java

Java Programming Language Number Class in java (Article) Number Class in java (Program)

837

Program:

public class WrapperminMethod {

    public static void main(String args[]) {
	      double degrees = 60.0;
	      double radians = Math.toRadians(degrees);

	      System.out.format("The value of pi is very very very approximately %.4f%n", Math.PI);
	      System.out.format("The arctangent of %.4f is %.4f degrees %n", Math.cos(radians),
	      Math.toDegrees(Math.atan(Math.sin(radians))));
	   }
}

/*

Returns the arctangent of the specified double value.

*/

Output:

The value of pi is very very very approximately 3.1416
The arctangent of 0.5000 is 40.8934 degrees
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.