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) {

        // get a variable x which is equal to PI/2
        double x = Math.PI / 2;

        // get a variable y which is equal to PI/3
        double y = Math.PI / 3;

        // convert x  and y to degrees
        x = Math.toDegrees(x);
        y = Math.toDegrees(y);

        // get the polar coordinates
        System.out.println("Math.atan2(" + x + "," + y + ")=" + Math.atan2(x, y));

    }
}