Find ceiling of number using math.ceil method of maths class

Find ceiling of number using math.ceil method of maths class

Previous Home Next

 

This program shows how the ceiling of the value of a number occurs using Math.ceil method of math class. 

Math.ceil method is one of the method of math class use to ceil the value of number. 
 Math.ceil method is one of the method of math class use to ceil the value of number. 

simply pass the value to the Math.ceil method to calculate value. it returns the value nearest to the ceil of the number. 

 

package Example;

public class CeilingExample {


public static void main(String[] args) {
System.out.println(Math.ceil(12.5));
System.out.println(Math.ceil(-1.23));
System.out.println(Math.ceil(25.369));


}

}

13
-1
26
Previous Home Next