Java Math calculate square root

Question

We would like to find out the square root of 225 using Java Math class.

Code structure you can use:

public class Main{
    public static void main(String[] arguments) {
        int number = 225;
        //your code here  
    }
}


public class Main{
    public static void main(String[] arguments) {
        int number = 225;
        System.out.println("The square root of "
            + number
            + " is "
            + Math.sqrt(number)
        );
    }
}



PreviousNext

Related