If i have a interface car that is to be implemented on various classes called BMW , AUDI etc . Now i want all of them to have a string instance color in which their colors should be stored . As they all can have a different colors I can not define a variable in interface for it as obligatorily final thus its value would not change as per the need of classes . so is there any way by which i can ensure that the color is used in every class .
Also please let me know that why are the variables in the interface always final ie what would be the problem if they were not final variables . I have already reffed to following questions but none was satisfactory Why are interface variables static and final by default?
and Few others too.