what is marker interface ? what is the necessity of it?

Answer Posted / sandeep

An interface that contains no methods. Eg: Serializable,
Cloneable, SingleThreadModel etc. It is used to just mark
java classes that support certain capability.

Is This Answer Correct ?    24 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What’s the difference between the methods sleep() and wait()?

532


What do you mean by platform independence?

577


What 4 doubled?

532


Why do people says “java is robust”?

544


What is the advantage of OOP in java?

655






What are methods in java?

530


How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

556


What is operator overloading. Is it is supported in java?

513


Can we have two main methods in a java class?

531


Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?

582


What is a boolean structure?

549


How does enum work in java?

536


What is difference between path and classpath in java?

476


What are the disadvantages of object oriented programming?

584


What does microservices mean?

522