Check out example codes for "creating the functional interface in java". It will help you in understanding the concepts better.

Code Example 1

package com.concretepage;

@FunctionalInterface
public interface Calculator {
   long calculate(long num1, long num2);
}

Learn ReactJs, React Native from akashmittal.com