minPositive and maxNegative will store smallest positive and smallest negative integer respectively .
int sum = 0 , minPositive = Integer . MAX_VALUE , maxNegative = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) {