can functional interfac methods have return type in java code example
Example 1: interface function
interface SearchFunc {
(source: string, subString: string): boolean;
}
Example 2: creating the functional interface in java
package com.concretepage;
@FunctionalInterface
public interface Calculator {
long calculate(long num1, long num2);
}