Marker interfaces have been a part of
Java since the beginning, while annotations were only introduced with Java 5. Everything that can be done with marker interfaces can be done instead with annotations; and in fact, it's now recommended that the "marker interface pattern" not be used any longer. Annotations can have parameters of various kinds, so they're much more flexible.