java - Why are interface variables static and final by default? -
why interface variables static , final default in java?
from java interface design faq philip shaw:
interface variables static because java interfaces cannot instantiated in own right; value of variable must assigned in static context in no instance exists. final modifier ensures value assigned interface variable true constant cannot re-assigned program code.
Comments
Post a Comment