1. public class ADirtyOne { 2. public static void main(String args[]) { 3. System.out.println(Math.abs(Integer.MIN_VALUE)); 4. } 5. }//less than zero why the output is less than zero???
Because it doesn't exist a similar value in the positive form. If you update the code subtracting 1 from the MIN_VALUE it'll work fine. [ February 16, 2003: Message edited by: Igor Zeta ]