Convert radians to degrees in Java

Hey, fellow code crafters! In this tutorial, you are going to learn the Java program to Convert radians to degrees.

Java Program to Convert radians to degrees

Understanding Degrees and Radians: A complete circle (360 degrees) is the same as 2 2π radians, which are both the units of angular measurement. Hence, 180 degrees is the radius of a circle, or π radians.

Degrees: A full circle is 360 degrees, providing degrees an additional unit of angular measurements.

Formula for Conversion
The following calculation will allow you to convert radians to degrees:

degrees = radians× 180 degrees = radians× 180

 

public class CodespeedyTechnology {
    public static void main(String[] args) {
        double radians = 9.5;
        double degrees = radians * (180.0 / Math.PI);
        
        System.out.println(radians + " radians is equal to " + degrees + " degrees.");
    }
}
9.5 radians is equal to 544.309905374282 degrees.

Hope this tutorial was helpful to you.

Leave a Reply

Your email address will not be published. Required fields are marked *