Find square root of a number using Math.sqrt - Java Language Basics

Java examples for Language Basics:Math

Description

Find square root of a number using Math.sqrt

Demo Code

public class Main {
 
  public static void main(String[] args) {
     System.out.println(Math.sqrt(9));
     System.out.println(Math.sqrt(25.5));
  }/*from  w w  w  .  j  av  a  2s  . c  o m*/
}

Result


Related Tutorials