title: Java 8 - Constructor Reference - The type Select does not define Select(DataObj) that is applicable here"
body: <p>I defined one <code>FunctionalInterface</code> as below:</p>
  
  <pre><code>@FunctionalInterface
  public interface BaseAction {
     public void execute(final DataObj dataObj) throws Exception;
  }
  </code></pre>
  
  <p>Then, a class implementing the same as follows:</p>
  
  <pre><code>public class Select implements BaseAction{
  
      @Override
      public void execute(final DataObj dataObj) {
          //some operations on dataObj here..
      }
  }
  </code></pre>
  
  <p>And when I tried instantiating the class <code>Select</code> using syntax prior to <code>Java 8</code>, compiles for me, as follows:</p>
  
  <pre><code>public BaseAction getAction(final String action) {      
      switch (action) {
            case "SELECT": return new Select(); //Works
       }
          return null;
  }
  </code></pre>
  
  <p>But, when I tried instantiating it using <code>Java 8</code> syntax, IDE starts complaining me <strong><code>"The type Select does not define Select(DataObj) that is applicable here"</code></strong>,</p>
  
  <pre><code>public BaseAction getAction(final String action) {
      switch (action) {
           case "SELECT": return Select::new; //Compile error here..
      }
      return null;
  }
  </code></pre>
  
  <p>Any idea how can I fix it?</p>