Long signum() Method in Java
The signum function also known as sign function is an odd mathematical function that extracts the sign of a real number. The java.lang.Long.signum() method is used to get the signum function of the specified long value. For a positive value, a negative value and zero, the method returns 1, -1 and 0