Here you can find the source of abs(int number)
Parameter | Description |
---|---|
number | the integer |
static int abs(int number)
//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; } }