I’m a bit confused about
The purpose of Marker Interface Vs
Attributes.
Their purpose looks same to me(Pardon me if I’m wrong).
Can anyone please explain how do they differ in purpose?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here are some advantages of both.
Marker interfaces:
On the other hand, attributes:
It heavily depends on the particular application’s architecture and design whether it’s appropriate to use a marker interface or an attribute in a particular case.