GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  BAAN Infotech
Next Question 
 BAAN Infotech  |  Question 1 of 2    Print  
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.

  
Total Answers and Comments: 4 Last Update: September 05, 2007     Asked by: Rajasheker 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 13, 2005 08:01:43   #1  
Jiji        

RE: There is no methods in the marker interface,then w...

Marker interfaces are used to show that a class is able to do something..
like the remote, serializable, cloneable.. etc..
only a class which implements serializable can be serialized..
only a class which implements the remote interface can be sais that a remote object.. etc..
hope u have got someidea..


 
Is this answer useful? Yes | No
October 17, 2005 02:42:14   #2  
Sreenivas Rao        

RE: There is no methods in the marker interface,then w...

Marker Interfaces are very useful, but it doesn't consists anu methods.

these interfaces are must be implemented by the class itself.

for ex. Serializable, cloneable, Single Thread Model, EventListener, Remote are marker interfaces


 
Is this answer useful? Yes | No
October 31, 2005 00:34:36   #3  
HariKrishna G        

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.
 
Is this answer useful? Yes | No
September 05, 2007 03:57:59   #4  
rajeev sangam        

RE: There is no methods in the marker interface,then w...
Marker interfaces are the degenerate case of contract beacause as we know they define no language-level behaviour- no metods or values. All their contract is in the documentation that describes the expectations you must satisfy if your class implements that interface.

Do not  be fooled into thinking that they are unimportant merely because they have no methods.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Related Categories
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape