Q:

parsing Hexadecimal in Java

taking in account that FFFFFFB2 in HEX is -78 in decimal
Why I have an error with this operacion ?
Integer.parseInt("FFFFFFB2", 16)

Error:
Exception in thread "main" java.lang.NumberFormatException: For input string: "FFFFFFFFFFFFFFB2"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:495)
    at tmp.Test.main(Test.java:11)

A:

taking in account that FFFFFFFFFFFFFFB2 in HEX is -78 in decimal"

Nope, FFFFFFFFFFFFFFB2 hex is 18446744073709552000 decimal. You're mistaking hex for 2s complement.
If you want to take a 2s complement bit pattern and convert it into a number, this answer suggests a trick:
long l = new BigInteger("FFFFFFFFFFFFFFB2",16).longValue();

And it actually works.
Note I used BigInteger and long, rather than long and int, as the number is too big.

