What is a tagged interface?

Questions by krudupa9   answers by krudupa9

Showing Answers 1 - 13 of 13 Answers

Ramesh

  • Dec 31st, 2005
 

Hi,

Tagged Interface is a Interface it doesn't have any method declarations.

We use tagged interface to indicate compiler or runtime to do some activity in our behalf like we use serializable interface to indicate that a particular class can be serialized.

Thanks,

kundan

Pramay Kumar Sharma

  • Jan 5th, 2006
 

Also known as Marker Interface and Ability Interface.

  Was this answer useful?  Yes

prasad

  • Jan 8th, 2006
 

It tells the information that the interface doesnot have any methods.

  Was this answer useful?  Yes

sacg

  • Jan 13th, 2006
 

Those interfaces which do not contains any methods , but its a indication for JVM that the implementation provider will have access to corrosponding functionality.

 Eg : 1. Serializable

        2. Remote

sacg

  • Jan 13th, 2006
 

Those interfaces which do not contains any methods , but its a indication for JVM that the implementation provider will have access to corrosponding functionality.

 Eg : 1. Serializable

        2. Remote

  Was this answer useful?  Yes

jadoo

  • Jan 16th, 2006
 

Tagged interface is the interface which have no method declaration it is used for making serialisable interface.

  Was this answer useful?  Yes

Ganesh Bala Kumar

  • Jan 25th, 2006
 

 Tagged Interface is just a mark to tell to the JVM about which type of Object it is.

Suppose one object implements Serializable then if we write

objectoutputstream.writeObject() then in the writeObject() method implementation as follows

writeObject(Object obj){

  if (obj instance of Serializable) {

}

}

  Was this answer useful?  Yes

Gautam

  • Jan 29th, 2006
 

Cloneable interface is one more such a Marker interface,When you override or call clone() method of java.lang.Object the compiler checks whether the present class implements the Cloneable interface or not.ThanksGautam

  Was this answer useful?  Yes

Manish

  • Feb 21st, 2006
 

Tagged interface is a utility interface.

If you implement an interface then it is necessary for you to give implementation to all of its methods(which might not be required), so the tagged interface actually have the blank implementation of all the methods so that you can override the requisite method only.

Is that right guys?????

Regards,

Manish

  Was this answer useful?  Yes

srinivas

  • Mar 10th, 2006
 

hi friendss,

tagged interface is an interface which is not have any method body so it also called as null interface and marker interface. we need to use that interfaces in java bcoz it provides some information abt java objects.

example serializable ,remote ,SingleThreadModel in servlets,Enterprisebean

okey Bayee......

if there is any questions on j2ee j2se plz send to my id

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

  Was this answer useful?  Yes

parimmallarekha

  • Jun 24th, 2006
 

tagged interface is nothing but null interface that means interface without any methods ex programme

interface black{}

interface orange{}

class drink1 implements black

{

}

class drink2 implements orange

{

}

class drink

{

public static void main(String args[])

{

drink1 d1=new drink1();

drink2 d2=new drink2();

if(d1 instanceof black)

System.out.println(" i am pepsi");

else

System.out.println("i am normal drink");

if(d2 instanceof orange)

System.out.println("i am miranda");

else

System.out.println(" i am ordinary drink");

}

examples: java.lang.clonable inteface

              java.util.eventlistener etc

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions