tan() Method in java
Java Programming Language Number Class in java (Article) Number Class in java (Program)
896Program:
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 %.4f%n", Math.PI); System.out.format("The tangent of %.1f degrees is %.4f%n", degrees, Math.tan(radians)); } } /* Returns the tangent of the specified double value. */
Output:
The value of pi is 3.1416 The tangent of 60.0 degrees is 1.7321 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.