How eclipse execute java code when there are compile errors

前端 未结 3 933
难免孤独
难免孤独 2021-01-21 05:25

When the following java code is executed in eclipse, it gives the correct output (i.e. prints \'Class B\'), but according to java specification, the code cannot be compiled (sin

3条回答
  •  抹茶落季
    2021-01-21 06:01

    Eclipse uses its own Java compiler (called ecj) instead of javac. This compiler allows (partial) compilation of broken source files.

提交回复
热议问题