Math: toDegrees(double theta)
/* * Output: 120.0 degrees is 2.0943951023931953 radians. 1.312 radians is 75.17206272116401 degrees. * */ public class MainClass { public static void main(String args[]) { double theta = 120.0; System.out.println(theta + " degrees is " + Math.toRadians(theta) + " radians."); theta = 1.312; System.out.println(theta + " radians is " + Math.toDegrees(theta) + " degrees."); } }