You can't create an object without method implementations. Anonymous inner classes allow you to do the following, though:
view plaincopy to clipboardprint?
public interface MyInterface {
public void myMethod() ;
}
...
MyInterface myIntfObj = new MyInterface() {
public void myMethod() {
....
}
};
myIntfObj.myMethod();
http://www.cegonsoft.com/dotnet.phpDot Net Training
Priyajagan, if this helps please login to Mark As Answer. |
Reply | Alert Moderator