The compare() method compares two primitive int values passed as arguments to this method. It compares both the int values numerically. Syntax of compare() method… [Read More]
Java Integer byteValue() Method
The byteValue() method of Integer class returns the given integer value in bytes after narrowing primitive conversion (Integer -> byte) . This method is used… [Read More]
Java Integer Class and Methods
Integer is a wrapper class for primitive int data type. This class provides several useful methods, which can be used to perform various operations on… [Read More]
Java Integer bitCount() Method
The bitCount() method of Java Integer class returns the number of 1’s bits in the two’s complement representation of the given integer value. public class… [Read More]
Java Math.ulp() Method
Java Math.ulp() method returns distance between the number passed as argument and the next floating point number. An ulp (unit in the last place or… [Read More]
Java Math.IEEEremainder() Method
Java Math.IEEEremainder(double f1, double f2) method returns the remainder of f1/f2 based on the IEEE 754 standard. The remainder is equal to the f1 -… [Read More]
Java Math.getExponent() Method
Java Math.getExponent() method returns unbiased exponent used in the representation of the argument. This method can accept double and float arguments. public class JavaExample {… [Read More]
Java Math.hypot() Method
Java Math.hypot(double x, double y) method returns the sqrt(x2 + y2), where x is the first argument and y is the second argument. This method… [Read More]
Java Math.rint() Method
Java Math.rint(double x) method returns the double value that is nearest to the given argument x and equal to a mathematical integer number. If two… [Read More]
Java Math.random() Method
Java Math.random() method returns a random double number between 0.0 and 1.0, where 0.0 is inclusive and 1.0 is exclusive. Number is chosen from this… [Read More]
Java Math.floorDiv() Method
Java Math.floorDiv(int x, int y) method returns the integer quotient value after dividing argument x by argument y. This method divides the argument x by… [Read More]
Java Math.floor() Method
Java Math.floor(double x) method returns the largest integer that is less than or equal to the given argument x. public class JavaExample { public static… [Read More]
Java Math.expm1() Method
Java Math.expm1(double x) method returns ex – 1. Here, e is a Euler’s number, whose approximate value is 2.718281828459045. public class JavaExample { public static void main(String[]… [Read More]
Java Math.toRadians() Method
Java Math.toRadians() method converts the given angle in degrees to radians. This the approximate conversion and in most of the cases, it is inexact. public… [Read More]
Java Math.toDegrees() Method
Java Math.toDegrees() method converts the angle given in radians to degrees. This is the approximate conversion and result are not exactly what you would expect…. [Read More]
- « Previous Page
- 1
- 2
- 3
- 4
- 5
- 6
- …
- 41
- Next Page »