标记界面中的混乱 [英] Confusion in marker interface
本文介绍了标记界面中的混乱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
标记接口是指没有方法的接口。那么为什么我们将Runnable接口称为标记接口,即使它有run()方法。
还有一件事在java中有多少标记接口?
Marker interface means interface which have no methods. Then why we call the Runnable interface as a marker interface, even though it has run() method. And one more thing how many marker interfaces are there in java ?
推荐答案
然后为什么我们将Runnable
接口称为标记接口
Then why we call the Runnable interface as a marker interface
我们不这样做。你刚刚做到了。
We don't. You just made that up.
这篇关于标记界面中的混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文