45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




Marker Interface

        

Reply
 
LinkBack Thread Tools Display Modes
Old 23-09-09, 01:52 PM   #1 (permalink)
Junior Member
 
Join Date: Nov 2006
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
Rep Power: 4 viskat is on a distinguished road
Marker Interface

Went thru a lot of threads, but not able to understand Marker Interface. The only way I can understand is by creating my own implementation of user defined Marker Interface. Please anybody give me a simple example of the same. Thank You.

viskat is offline Offline   Reply With Quote
Old 03-10-09, 11:52 AM   #2 (permalink)
Member
 
Join Date: Jul 2008
Age: 32
Posts: 55
Thanks: 0
Thanked 9 Times in 7 Posts
Rep Power: 3 hightech will become famous soon enough hightech will become famous soon enough
Re: Marker Interface

In java language programming, interfaces with no methods are known as marker interfaces. Marker interfaces are Serializable, Clonable, SingleThreadModel, Event listener. Marker Interfaces are implemented by the classes or their super classes in order to add some functionality.
e.g

Suppose the interface Clonable is neither implemented by a class named Myclass nor it's any super class, then a call to the method clone() on Myclass's object will give an error. This means, to add this functionality one should implement the Clonable interface. While the Clonable is an empty interface but it provides an important functionality.
hightech is offline Offline   Reply With Quote
Old 12-10-09, 12:45 PM   #3 (permalink)
Member
 
Join Date: Jul 2008
Age: 32
Posts: 55
Thanks: 0
Thanked 9 Times in 7 Posts
Rep Power: 3 hightech will become famous soon enough hightech will become famous soon enough
Re: Marker Interface

Marker interface is a Java interface which doesn't actually define any fields. It is just used to "mark" Java classes which support a certain capability -- the class marks itself as implementing the interface. For example, the java.lang. Cloneable interface.
hightech is offline Offline   Reply With Quote
Reply

Tags
interface , marker


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JAVA collection naga JAVA Technologies 1 11-01-09 12:38 AM
JAVA Q&A part1 naga JAVA Technologies 3 25-12-08 11:48 PM
question on marker interface raghuvamshi_ece JAVA Technologies 2 09-10-07 07:53 PM
Abstract Classes versus Interfaces? radhika743 JAVA Technologies 5 16-01-07 07:54 PM
interface objects priya2k6 JAVA Technologies 1 06-09-06 01:16 AM


All times are GMT +6.5. The time now is 11:41 AM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0