| |
GeekInterview.com > Placement Papers > BAAN Infotech
| Print | |
Question: There is no methods in the marker interface,then what is the use of marker interface.And what is the functionality of the interface.Why we need to implement marker interface.
|
| October 10, 2005 00:34:36 |
#3 |
| HariKrishna G |
Member Since: Visitor Total Comments: N/A |
RE: There is no methods in the marker interface,then w... |
| In java interfaces are used to describe the behaviour, and whereas the class for describing both the state and behaviour.There are certain important operations such as storing the state of the object, cloning an object, dealing with threads etc, wherein we dont want the user to do any specific coding, but we want that behaviour to be achieved. In these cases we can declare the interfaces as a MARKER interface or a TAGGED interface.When we implement a marker interface, ultimately we will be getting the features incorporated in it, without writing any piece of code. |
| |
Back To Question | |