Negative numbers are the 2's complement of positive numbers and vice versa, so I suppose you could parse your string into an int
, multiply by -1, and then parse it back into the resulting hex string.
int intVal = Integer.parseInt("03E7", 16);
String twosComplement = Integer.toHexString((-1 * intVal));