In this example we will show you how to use Math.tan() in Java.
Source Code
package com.beginner.examples;
public class Tan {
public static void main(String[] args){
System.out.println(Math.tan(20)); // use Math.tan()
}
}
Output:
2.237160944224742