//---------------------------
interface Dartinterface default BasicInterface{
MyInterface();
Dartinterface();
}
class BasicInterface implements Dartinterface{
MyInterface(){
print("I an a inteface");
}
}
void main(){
//BasicInterface obj = new BasicInterface();
Dartinterface obj = new Dartinterface();
obj.MyInterface();
}
-----------------------------------------------//
but i can not understood what is the main advantage of that default class interface.

VulpesPosted Jul 18, 2012, 4:27 AM
Provided that the interface also provides a constructor, you can then create a default object which implements the interface by instantiating the interface itself:
Dartinterface obj = new Dartinterface();
I can't say I care much for this feature which makes the distinction between classes and interfaces rather hazy.