I have been trying to find errata for SCJP 6 book but unable to find it so posting the question here.
Octal literals can have up to 21 digits not including the leading 0.
My question is whether this accounts for the sign bit which makes it possible to create a literal like:
which makes it 22 digits excluding the leading 0.
I was hoping I could find an errata link so I did not need to post this question.
I hope some one can point me to it.
Primitive long type hold 64 bits.
1st bit shows sign of value and another remaining 63 bits shows numeric value of primitive long type.
In the following literal
First leading zero indicate this number as octal literal representation.
Octal literal representation means every digit in this number is combination of 3 bits so there are 21 digits means 63 bits which represent value of number.
I break up the number in following binary number form
First one shows leading 0 to indicate it is octal literal
Second 1 shows sign of number. In this first 001 combination 00 has no value so it is equivalent to 1 that is 001 => 1
and reamaining bits shows value of long type number.