square root java

Java
import java.math.*;
double x=144;
double y=math.sqrt(x); //You can only pass double numbers not float// Java program to demonstrate working 
// of java.lang.Math.sqrt() method 
import java.lang.Math; 
  
class Gfg { 
  
    // driver code 
    public static void main(String args[]) 
    { 
        double a = 30; 
  
        System.out.println(Math.sqrt(a)); 
  
        a = 45; 
  
        System.out.println(Math.sqrt(a)); 
  
        a = 60; 
  
        System.out.println(Math.sqrt(a)); 
  
        a = 90; 
  
        System.out.println(Math.sqrt(a)); 
    } 
} 

Source