When declaring the number 0xFFFFFFFF (4294967295) as a long, java will set the variable to the number -1.
public static final long Bits32 = 0xFFFFFFFF; //Bits32 = -1
I assume that java initially converts the hexadecimal to an integer and then converts this to the long variable. The obvious work around would to set Bits32 to the number 4294967295 instead. However this doesn't seem like a neat solution to me.
Dose anyone know how I would be able to declare a long to this number without having to manually convert the hexadecimal?
Cheers, Chris.