The Math class has a method abs() that does this:int account = -100;
// now account will be 100
account = Math.abs(account);
// or you could use an if statement...
// but I'm sure you have thought of that!
if(account < 0) account = -account;
If you don't want to actually change the value of account - if you just want to print it:System.out.printf("The absolute value of account is %d%n", Math.abs(account));