Anonymous-Inner classes showing incorrect modifier

前端 未结 4 1930
半阙折子戏
半阙折子戏 2020-11-30 11:10

To my understanding, the following code should have printed true as output.

However, when I ran this code it is printing false.

Fro

4条回答
  •  情歌与酒
    2020-11-30 11:36

    See Javadoc of Class.getModifiers(): https://docs.oracle.com/javase/10/docs/api/java/lang/Class.html#getModifiers()

    It says "...The values of its other modifiers are not determined by this specification".

提交回复
热议问题