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
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: 1105
    
    1

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
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
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.


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: Marker interface query