Java Quiz 53 & 53B
What is an interface?
An interface is a collection of constants and method declarations.
When a class implements an interface, what must it do?
It must declare and provide a method body for each method in the interface.
Can an interface be given the private access modifier?
No—then the interface could never be used.
Is the following a correct way to start out a class definition:
Yes—SomeClass is automatically a child of the class Object.
Can an interface name be used as the type of a variable, like this: public static void
Yes—the variable can refer to any object whose class implements the interface.