Last Updated 40 Weeks Ago

Feb 23, 2009 09:41

So...yeah, I guess I suck at updating. But whatever.

Random coding gripe of the day. What's the point of creating an interface class if you're going to leave it completely empty; it isn't usable as a real base type that way, now is it?

Leave a comment

Comments 1

crescentdude February 23 2009, 16:08:28 UTC
It's a "marker interface". It has a variety of uses. Serializable and Remote are marker interfaces. It can be used as a security measure where you have an action that can be performed on any object, but that you want to only perform on objects specifically tagged with that marker.

I'm pretty sure, though, that annotations in Java 5 and beyond have eliminated the need for marker interfaces.

Reply


Leave a comment

Up