Adobe Interview Question
Applications DevelopersCountry: India
Interview Type: In-Person
Well.. may be we can use the empty class to create a unique token.. for utilisation purpose..
empty class can be used as the marker using inheritance:
class Marker{
}
class C : Marker{
}
and later the code can call something like:
var c = new C();
if(c is Marker){
}
We sometimes use empty marker interfaces, not classes.
I've always heard Serializable is a marker interface. Does that mean that this interface has no declared methods?
Is there any empty class in the java library.. ? curious..
- teli.vaibhav February 10, 2013