Hi,
As I know that market interface doesn't contain any methods or variables.
But JVM provides extra capability to the class that implements marker interface. For example, we can create clone of an object if it's class implements Clonable interface. Otherwise we cannot create clone of an object. Violating above rule raises runtime exception called CloneNotSupportedException.
Can we call Comparator interface as an marker interface eventhough it is having abstract method called compare. The signature of comapare in Comparator interface is as follows:
1. Can we call Comparator interface as marker interface?
2. Is any interface in
java ,with methods called as marker interface?
Waiting for reply. Thanks in advance!
Have a wonderful day ahead!
Regards,
Gopal