Java中的Marker Interfaces有什么用

Marker Interfaces就是没有方法的空接口,如Serializable, Clonnable, Remote,等等,它们存在的意义是什么呢?接口

标准回答是:used to indicate something to compiler or JVM.io

其实,Annotation也具备一样的能力,甚至更能胜任。sed

相关文章
相关标签/搜索