aspose file tools
The moose likes Features new in Java 8 and the fly likes Marker interface query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Features new in Java 8
Bookmark "Marker interface query" Watch "Marker interface query" New topic
Author

Marker interface query

Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1321

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

Joined: Mar 22, 2005
Posts: 42956
    
  73
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Marker interface query
 
It's not a secret anymore!