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

What is the null?

539


Give me example of derived data types.

589


Define inheritance with reference to java.

582


Why do we override tostring method in java?

496


What about main() method in java ?

565






Why do we need hashset in java?

496


What are data structures in java?

528


Why generics are used in java?

549


java Technical questions asked by JPMC

4571


What does jenkins do?

486


Why webdriver is an interface?

577


What is a pattern what is an anti pattern?

505


Explain runtime exceptions?

740


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

596


What are register variables what are the advantages?

446