to get the square root of a number,let's say 9 (w/c is 3) try thisone in your main method:double anyNumber=9;System.out.println("Square root: " + Math.sqrt(anyNumber));