Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Marker interface query

 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marker interface is supposed to be an interface with no method definition it.


Consider below mentioned CustomMarkerInJava8 interface. Here, interface contains only default method but no method definition. Can we consider below mentioned interface as a valid Marker interface in Java 8?



Thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You should not still be using marker interfaces anyway - with the advent of annotations, that's the mechanism of choice for class meta-data.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic