Methods in an interface are always public and abstract. No other modifiers may be applied. Variables in an interface are public , static , and final . They must be initialized. The syntax interfaceName variableName declares a variable or parameter to be an instance of some class that implements interfaceName .
Interfaces behave exactly as classes when used as a type.
This lets the programmer specify that an object must implement a given interface, without having to know the exact type or inheritance of the object. Using interfaces makes it unnecessary to force related classes to share a common abstract superclass or to add methods to Object. Packages A tool for managing a large namespace. A package is a grouping of classes and interfaces. The import keyword is used to mark classes as being imported into the current package.