How Marker Interface is handled by JVM

后端 未结 7 694
清歌不尽
清歌不尽 2020-12-09 23:07

Marker interface doesn\'t has any thing. It contains only interface declarations, then how it is handled by the JVM for the classes which implements this marker interface?

7条回答
  •  悲哀的现实
    2020-12-09 23:59

    As far the compiler and the JVM are concerned, there is absolutely no difference between a marker interface and any other interface.

    And yes, you can create marker interfaces as you please.

提交回复
热议问题