Java Math multiplyExact() method returns the product of its arguments. In this tutorial, we will discuss multiplyExact() method with examples. public class JavaExample { public… [Read More]
Java Math.subtractExact() Method
Java Math.subtractExact() method returns the difference of its arguments. It subtracts the value of second argument from the first argument and returns the result. public… [Read More]
Java Math.addExact() Method
Java Math.addExact() method returns sum of its arguments. public class JavaExample { public static void main(String[] args) { int i = 10, i2 = 20;… [Read More]
Java Math.nextDown() Method
Java Math.nextDown() method returns floating point number adjacent to the passed argument, in the direction of negative infinity. public class JavaExample { public static void… [Read More]
Java Math.nextUp() Method
Java Math.nextUp() method returns floating point number adjacent to the passed argument, in the direction of positive infinity. public class JavaExample { public static void… [Read More]
Java Math.nextAfter() Method
Java Math.nextAfter() method returns the floating point number adjacent to the first argument, in the direction of second argument. public class JavaExample { public static… [Read More]
Java Math.copySign() Method
Java Math.copySign() method returns the first argument with the sign of second argument. In simple words, it copies the sign of second argument and replaces… [Read More]
Java Math.ceil() Method
Java Math.ceil() method returns the closest integer value, which is greater than or equal to the given value. For example, Math.ceil(9.9) would return 10. In… [Read More]
Java Math.signum() Method
Java Math.signum() method returns the signum function of passed argument. If the argument is zero, it returns zero. If argument is negative, it returns -1.0…. [Read More]
Java Math.pow() Method
Java Math.pow() method returns, first argument raised to the power of second argument. For example, Math.pow(3, 2) returns 9. In this tutorial, we will discuss… [Read More]