This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
jacob deiter wrote:In Java class If any variable is declared then no need to initialize the variable. But In interface if any variable is declared then no need to initialize.
per the JLS, every "variable" declared in an interface is implicitly public, static, and final.
per the JLS, 9.3.1: Every field in the body of an interface must have an initialization expression, which need not be a constant expression. The variable initializer is evaluated and the assignment performed exactly once, when the interface is initialized.