Saturday, January 8, 2011

Q. Why interface variables are final?


Ans. An Interface is a contract, so everything has to remain the same. If you declare a variable, it means that the variable is always available to the implementation. This is also true to the value. If someone was able to change the value, you can not depend on the value, thus breaking the contract. 


Q. Why there are two ways of implementing Thread in Java?


Please answer this question.

No comments:

Post a Comment