Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当你在 Java 中序列化一个对象时,字母 J 用于表示下一个字节代表 a long,字母 L 用于表示Object下一个,但为什么呢?为什么不使用 O forObject和 L for long?
long
Object
这些字母肯定是因为冲突而被选中的。对这种冲突的猜测:
C被用于char。因此,他们将L用于class。
L被带去上课。因此,他们长期使用J。
B被当作byte。因此,他们使用Z表示boolean。
顺便说一句,' L ' 不是指' Object ',而是' fully-qualified-class '。