// MathSqrtExample.java – Compute the square root of a number
class MathSqrtExample {
public static void main(String args[]) {
double x = 4;
double y;
y = Math.sqrt(x);
System.out.println(“The square root of ” + x + ” is ” + y);
}
}