问题
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 ?
回答1:
Then why we call the Runnable interface as a marker interface
We don't. You just made that up.
回答2:
Runnable is not a Marker interface. AFAIK, Serializable, Clonable, SingleThreadModel, EventListener, RandomAccess, Remote are Marker Interfaces.
来源:https://stackoverflow.com/questions/2294350/confusion-in-marker-interface