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.
In java variables overriding is not possible. In second interface you are redeclaring interfaceConstant variable or you can say you are hidding first interfaceConstant by second interfaceConstant variable this is why you get output - 12
Joined: Feb 07, 2005
check code Above.
Joined: Jul 21, 2006
Interface variables are implicitly final Then how come we redeclare an interface variable
Both Interface varibles are declaring, intializing and working seperately. and there is not link b/w them. So which interface variable you will call you will get that value. Hope you understand now. thanks