Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to import math lib in java

import static java.lang.Math.sqrt;
public class Demo {
   public static void main(String[] arg) {
      double num = 36.0;
      System.out.println("The number is: " + num);
      System.out.println("The square root of the above number is: " + sqrt(num));
   }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #import #math #lib #java
ADD COMMENT
Topic
Name
4+8 =