I know marker interface in java. It is used to define a specific behaviour about a class. For example, Serializable interface has the specific ability to store an object into byte stream and its reverse process. But I don't know where this specific behaviour is implemented, because it doesn't have any method in it.
- How JVM invoke this specific behaviour?
- How to write our own marker interface? Can you give me a simple user defined marker interface for my understanding?
- Is it possible to have methods in marker interface?
Please guide me to resolve this issue.