Identical Java sources compile to binary differing classes

前端 未结 5 1861
醉梦人生
醉梦人生 2021-01-02 00:40

Can anyone explain how identical Java sources can end up compiling to binary differing class files?

The question arises from the following situation:

<
5条回答
  •  耶瑟儿~
    2021-01-02 01:21

    Different JDK produce different binary classes (optimizations, but also class version number). There are compilation options, too (a JDK may compile in an older format, or it can add debug information).

提交回复
热议问题