java - How marker interface are identified by JVM? -


this question has answer here:

i have gone through few question in stack overflow not find suitable answer. raising more clarity.

i know marker interface interface no methods. when implement marker interface example serializable declares class implementing becomes eligible serialization.

my question how jvm understands objects of class implementing serializable interface should serialized. if write interface no methods , hope objects of class implements serialized i'll not work way.

is possible create custom marker class.?

they aren't 'identified jvm' @ all. they're identified java code interested in them, example objectoutputstream, via instanceof operator.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -