Which of the following statements is false?
a. Functional interfaces must contain only one method and that method must be abstract.
b. When a class implements an interface with default methods and does not override them, the class inherits the default methods’ implementations. An interface’s designer can now evolve an interface by adding new default and static methods without breaking existing code that implements the interface.
c. If one class inherits the same default method from two interfaces, the class must override that method; otherwise, the compiler will generate a compilation error.
d. You can create your own functional interfaces by ensuring that each contains only one abstract method and zero or more default or static methods.
a. Functional interfaces must contain only one method and that method must be abstract. Actually, functional interfaces must contain only one abstract method, but may also contain default methods and static methods that are fully implemented in the interface declarations.
You might also like to view...
What British Standards Institution standard was used as the basis for the ISO 9000 standard?
A. BS 5705 B. BS 5570 C. BS 5507 D. BS 5750
Arrays static method ________ applies a BinaryOperator to the current and previous array elements and stores the result in the current element.
a. prefix b. parallelSet c. parallelApply d. parallelPrefix
Give a command that reads its input from a file called ‘Phones’, removes unnecessary spaces from the file, sorts the file, and removes duplicate lines from it.
What will be an ideal response?
A(n) ____ defines the circumstances under which a class can be accessed and the other classes that have the right to use a class.
A. identifier B. access specifier C. parameter D. Pascal casing