Get the sign of an Integer

static intsignum(int i)Returns the signum.

signum(int i) Returns

-1if i is negative;
0if i is zero;
1if i is positive.

public class Main {
  public static void main(String[] args) {


The output:

1  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.