Java中的Marker Interfaces有什么用

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

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

其实,Annotation也具有同样的能力,甚至更能胜任。

posted on 2014-12-08 17:44  万木春  阅读(292)  评论(0编辑  收藏  举报

导航