Originally posted by Rajesh Varma:
If there are no methods in a marker interface, then what's the use?
Originally posted by Ilja Preuss:
Since Java 5, you should use annotations instead of marker interfaces.
Originally posted by Jeroen T Wenting:
That depends on the philosophy you follow
If a marker interface just tells you something about the class, then yes.
If the marker interface tells you the class is something special, then a marker interface is a valid OO construct even if it doesn't add functionality.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton