//---------------------------
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.


VulpesRank #55 · 29.2K reputationPosted Jul 18, 2012, 12:27 AM EDT
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.