Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Marker/Tag interfaces.

 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we have marker interfaces, whats the use since they do not have anything(nethods,variables) inside them.

We need to implement the marker interfaces like Serializable,Cloneable etc .
Internally do these interfaces do anything may be use pointers or references or sthg thats not visible to the outside world ?

Thanks
 
Ankit Garg
Sheriff
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are lots of articles on this on the internet like these: Purpose of Marker Interfaces, Marker Interface Pattern, Marker interfaces in java...
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!