2 ms·
Only if you mark that class with `@FunctionalInterface`. Unfortunately, methods are not first-class objects in Java (while classes, with .class, are).
by nine_k 5y ago
Only if you mark that class with `@FunctionalInterface`.
Unfortunately, methods are not first-class objects in Java (while classes, with .class, are).