Implementing Interface Members ImplicitlyClasses implement interfaces. To implement an interface means to provide code for each one of the methods defined in the interface. The compiler forces you to add code for every single method in the interface. This is because a developer using the interface expects that the class that implements the interface will have every method in the interface defined. There are two mechanisms for implementing interfaces in a class: an implicit mechanism and an explicit mechanism. I will show you the implicit way first. To implement an interface implicitly:
Tips
|