Here you can find the source of absNeg(final int a)
public static int absNeg(final int a)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w .j ava 2 s . c om * @return The negative of the absolute value (always exact). */ public static int absNeg(final int a) { return (a >> 31) - (a ^ a >> 31); } /** * @return The negative of the absolute value (always exact). */ public static long absNeg(final long a) { return (a >> 63) - (a ^ a >> 63); } }