This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
We declare interface constants as public static and final. I understand why we declare them as public and final. But why do we make them static? [ August 04, 2008: Message edited by: Prabu JayaPandian ]
Because if they weren't static, they would belong to instances. First of all, that means data replication - all instances of all implementing classes will have the exact same constant variables. Second of all, instance variables are part of the implementation, and interfaces can have no implementation.