Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {

        double d1 = (60 * (Math.PI)) / 180, d2 = 0.0, d3 = (1.0 / 0.0);

        System.out.println("Trigonometric cosine of d1 = " + StrictMath.cos(d1));

        System.out.println("Trigonometric cosine of d2 = " + StrictMath.cos(d2));

        System.out.println("Trigonometric cosine of d3 = " + StrictMath.cos(d3));
    }
}