Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Getting MEAN with Mongo, Express, Angular, and Node
this week in the
Joined: May 14, 2005
Oct 16, 2005 22:39:00
Why shall we use an empty interface(marker interface)?
Is there any specific use if there are no methods in the interface?
Joined: Oct 11, 2005
Oct 17, 2005 00:17:00
A marker interface is a interface with emplty methods/behavior. One of its purposes is to tag the classes implementing this interface. mainly this is used to group classes of the interface type.
In this case, any instances of the class are valid instances of interface.
refer to this link.
Joined: Mar 13, 2005
Oct 17, 2005 12:16:00
I found this link useful
Hope this helps!!!
Raghu<br />SCJP 1.4<br />SCWCD 1.4<br />SCBCD 1.3
I agree. Here's the link:
subject: empty interface
Marker Interface purpose
Empty abstract classs vs Empty interface
use of empty interface
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015