how can i create a interface that can be implemented just like serilaizable interface. I don't wan either to implement Serializable interface or extend any class. by my interface. Marker interface doesnotconatins any method declaration.
Joined: Oct 30, 2001
Your question is not very clear (is your space-bar broken?!), but I suspect it does not belong in Advanced forum.
Are you just asking how to create a marker interface? If so, that's just a question of creating an interface with no members.
Identifying whether an object supports a marker interface is a trivial application of "instanceof" operator.
It sounds as if you want to duplicate the serialisation mechanism - why? The serialisation mechanism has, I believe, a few "magic" hooks into the JVM, which you'd struggle to replicate in your own code. Most of it is just pure Java, though, and you can look at it in the JDK source.
If you want to do something like serialisation, but with more control, you could read up on Externalizable interface. This is part of the serialisation mechanism, but more of the implementation is up to you.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P