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]
Java Math.cbrt() Method
Java Math.cbrt() method returns cube root of a given double value. In this guide, we will discuss cbrt() method with examples. public class JavaExample {… [Read More]
Java Math.sqrt() Method
Java Math.sqrt() method returns the square root of a given number. In this guide, we will discuss sqrt() method in detail with examples. public class… [Read More]
Java Math.round() Method
Java Math.round() method returns closest number to the passed argument. For example, Math.round(15.75) would return 16. In this tutorial, we will discuss the round() method… [Read More]
Java Math.min() Method
Java Math.min() method returns the smaller number between two numbers passed as arguments. In this tutorial, we will discuss Math.min() method with examples. public class… [Read More]
Java Math.max() Method
Java Math.max() returns the greater number between two passed numbers. In this tutorial, we will discuss this method in detail with the help of examples…. [Read More]