| Author |
Marker Interface
|
sahidul karim
Greenhorn
Joined: Sep 19, 2006
Posts: 28
|
|
|
How can i create my own marker interface?
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
Create a interface without any method and variable in that... That makes the interface as marker. though i guess that there is no formal defination of marker interface. [ December 11, 2006: Message edited by: Rahul Bhattacharjee ]
|
Rahul Bhattacharjee
LinkedIn - Blog
|
 |
Prabhu Venkatachalam
Ranch Hand
Joined: Nov 16, 2005
Posts: 502
|
|
Marker Interface will be used, when you want mark your Class saying it is serlizable or colneable? Likewise you can create an Interface like Rahul said, If you have such a kind of requirement. hth,
|
Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12909
|
|
Note that marker interfaces are an old "hack". If you are using Java 5.0 or newer you should use annotations instead of marker interfaces. See for example An Introduction to Java Annotations and Of Java Annotations to learn what annotations are.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Marker Interface
|
|
|