java.lang.Long.signum()


java.lang.Long.signum()

package com.codingdict;



import java.lang.*;



public class LongDemo {



   public static void main(String[] args) {



      // returns 1 as long value is greater than 1

      System.out.println(Long.signum(87654));



      // returns -1 as long value is less than 1

      System.out.println(Long.signum(-56578));



      // returns 0 as long value is equal to 0

      System.out.println(Long.signum(0));

   }

}