I have an interface that is implemented by 100 classes, if I add a method to the interface will my classes compile? How can I fix any errors?

Byron Tymvios

All the implementing classes will not compile. An interface is a contractual obligation. By implementing that interface you are guaranteeing that your class will fulfill its contractual obligation. If you add a new method to an interface then, by definition, all classes implementing that interface will have to implement the new method.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact