title: Is lambda expression only applicable for functional interface?
body: <p>I have just started learning java 8. There I read that lambda expression can only be applied to functional interfaces.
  But below code, I see from a java site. Here it is using MathOperation class and referring its methods using lambda expression, not referring to any method of a functional interface. If someone helps me understand it, it would be great.</p>
  
  <pre><code>package com.jcg.java;
  
  import java.util.function.BiFunction;
  
  class MathOperation {
  
      /**** Addition ****/
      public int add(int a, int b) {
          return a + b;
      }
  
      /**** Subtraction ****/
      public int sub(int a, int b) {
          return a - b;
      }
  }
  
  /***** Reference To An Instance Method Of A Particular Object *****/
  public class MethodReferenceEx2 {
  
      public static void main(String[] args) {
  
          MathOperation op = new MathOperation();
  
          /**** Using Lambda Expression ****/
          System.out.println("--------------------Using Lambda Expression----------------------");
          BiFunction&lt;Integer, Integer, Integer&gt; add1 = (a, b) -&gt; op.add(a, b);
          System.out.println("Addtion = " + add1.apply(4, 5));
  
          BiFunction&lt;Integer, Integer, Integer&gt; sub1 = (a, b) -&gt; op.sub(a, b);
          System.out.println("Subtraction = " + sub1.apply(58, 5));
  
          /**** Using Method Reference ****/
          System.out.println("\n---------------------Using Method Reference---------------------");
          BiFunction&lt;Integer, Integer, Integer&gt; add2 = op::add;
          System.out.println("Addtion = " + add2.apply(4, 5));
  
          BiFunction&lt;Integer, Integer, Integer&gt; sub2 = op::sub;
          System.out.println("Subtraction = " + sub2.apply(58, 5));
      }
  }
  </code></pre>