Import Java Math

[Solved] Import Java Math | Java - Code Explorer | yomemimo.com
Question : import math java

Answered by : marton

import java.lang.Math.*;
// usage
double radius = 15;
double area = Math.PI * radius * radius;

Source : https://study.com/academy/lesson/how-to-use-pi-constant-in-java.html | Last Update : Sat, 13 Mar 21

Question : import java.lang.Math.*;

Answered by : junqi-zhu

import static java.lang.Math.sqrt;
public class Demo {
   public static void main(String[] arg) {
      double num = 3.0;
      System.out.println("The number is: " + num);
      System.out.println("The square root of the above number is: " + sqrt(num));
   }
}

Source : https://www.tutorialspoint.com/static-import-the-math-class-methods-in-java | Last Update : Wed, 30 Mar 22

Question : java math ceil

Answered by : calm-centipede-o6srxi0hub44

Math.ceil(125.9)=126.0
Math.ceil(0.4873)=1.0
Math.ceil(-0.65)=-0.0

Source : https://www.tutorialspoint.com/java/lang/math_ceil.htm | Last Update : Wed, 04 Aug 21

Answers related to import java math

Code Explorer Popular Question For Java