use of functional interface in java 8 code example Example: interface function interface SearchFunc { (source: string, subString: string): boolean; }