An interface defines a protocol of behavior and not how we should be implemented. A class that implements an interface follows the protocol defined by the interface.
interface interfaceName{ // Any number of final, static variables datatype variableName = value; // Any number of abstract method declarations returntype methodName(list of parameters or no parameters); }
The above is the detailed content of Why are interface variables in Java static and final by default?. For more information, please follow other related articles on the PHP Chinese website!