If we look at the binary for the number 10 we can see
0000 0000 0000 0000 0000 0000 0000 1010
Where the first 0 is the signing bit.
If we now flip the binary INCLUDING the signing bit, we get:
1111 1111 1111 1111 1111 1111 1111 0101
Which... if you consider that java uses signed integers, is -11.
If we get away from signed numbers for a second and just consider the value of a 4-byte unsigned integer that is ~10 we get the value of: 4294967285.
To convert a unsigned integer to a two's complement signed integer we subtract the value of 2^32 from the integer if its over 2^31 - 1.
2^32 - 4294967285 = -11