Hi can u pls tell me what is the use of marker interface.
Iknow what is marker interface but what ability will the
object get by implementing this.

Answer Posted / sudheer

The interfaces with no defined methods act like markers. They just tell the compiler that the objects of the classes
implementing the interfaces with no defined methods need to be treated differently.
Example Serializable, clonable etc.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you clear an arraylist in java?

491


How do I compare two strings in word in java?

533


Explain different types of wrapper classes in java?

595


Is java a security risk?

559


Define an enumeration?

609






What is the difference between private & public & friendly classes?

542


How many functional interfaces does java 8 have?

598


What is a superclass?

920


What is the original name of java?

535


Can an unreferenced object be referenced again?

756


What are the parts of methodology?

542


Is void a data type?

534


Define max and min heap, also the search time of heap.

584


Explain what is encapsulation?

599


What about abstract classes in java?

606