Online Java Compiler By
JavaTpoint.com
public class CosExample2 { public static void main(String[] args) { double a = 0.0; double b = Math.toRadians(a); System.out.println(Math.cos(b)); } }
Output