How to Use Math.cos() in Java


In this example we will show you how to use Math.cos() in Java.

Source Code

package com.beginner.examples;

public class Cos {
  public static void main(String[] args){
    System.out.println(Math.cos(20)); // use Math.cos()
  }
}

Output:

0.40808206181339196
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments