how get the absolute of a negativ number in java code example Example: finding absolute value in java import java.lang.Math; int sum,x=-5; sum = Math.abs(x);