When you serialise an object in Java, the letter J is used to signify the next bytes represent a long
and the letter L is used to signify that an Object
is next, but why? Why not use O for Object
and L for long
?
These letters certainly were choosen because of conflicts. A guesswork of that conflicts:
C was taken for char. So, they used L for class.
L was taken for class. So, they used J for long.
B was taken for byte. So, they used Z for boolean.
By the way, 'L' doesn't mean 'Object', but 'fully-qualified-class'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With