Wednesday, 3 May 2017

Java -point to remember


Interface method header overriding caution

When you implement an interface method (by overriding the interface's method header), remember that all of the methods whose headers are declared in the interface are implicitly declared public. If you forget to include public in the implemented method's declaration, the compiler will report an error informing you that you're attempting to assign weaker access to the implemented method.
========================================================




No comments:

Post a Comment