-
Java Marker Interface (3 messages)
- Posted by: Jhons Smith
- Posted on: January 07 2007 03:11 EST
What is the use of Marker interface, eventhough it has no methods? And how o control the actions occured by those interfaces?Threaded Messages (3)
- Re: Java Marker Interface by umar ali on January 08 2007 00:48 EST
- Re: Java Marker Interface by umar ali on January 09 2007 00:17 EST
- Java Marker Interface by Anup Sabbi on April 20 2007 11:36 EDT
- Re: Java Marker Interface by umar ali on January 09 2007 00:17 EST
-
Re: Java Marker Interface[ Go to top ]
- Posted by: umar ali
- Posted on: January 08 2007 00:48 EST
- in response to Jhons Smith
Marker interfaces are understood by the JVM. The JVM takes care of how to deal with a class that implements that marker interface -
Re: Java Marker Interface[ Go to top ]
- Posted by: umar ali
- Posted on: January 09 2007 00:17 EST
- in response to umar ali
An example of how Marker interfaces are resolved can be found at the link below: http://jdj.sys-con.com/read/36635.htm here is a snippet from the same link When you implement Serializable, you don't even have to implement any new methods because Serializable doesn't declare any. So then what good does implementing Serializable do? Serializable does not implement or declare a class's serializable behavior; the default implementation for that behavior is already implemented by ObjectOutputStream.defaultWriteObject() and ObjectInputStream.defaultReadObject(). (It would have just been easier to put this code in Object as default implementations of readObject(ObjectInputStream) and writeObject(ObjectOutputStream) that subclasses could override or extend................. -
Java Marker Interface[ Go to top ]
- Posted by: Anup Sabbi
- Posted on: April 20 2007 11:36 EDT
- in response to umar ali
Here is another article on Marker Interface. http://www.anupsabbi.com/index.php?content=articles/java/marker_interfaces.html