Java Abs abs(int number)

Here you can find the source of abs(int number)

Description

return the absolute integer

License

Open Source License

Parameter

Parameter Description
number the integer

Return

the absolute of number

Declaration

static int abs(int number) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from  www  . jav  a2s .c  o m*/
     * return the absolute integer
     * @param number the integer
     * @return the absolute of number
     */
    static int abs(int number) {
        return (number < 0) ? -number : number;
    }
}

Related

  1. abs(float value)
  2. abs(float[] items)
  3. abs(float[] values)
  4. abs(int i)
  5. abs(int n)
  6. abs(int pos, double[] array)
  7. abs(int val)
  8. abs(int val)
  9. abs(int value)