title: Java 8: Is it possible to assign a method reference to a variable?
body: <p>I Googled for an answer to this question but couldn't find one.</p>
  
  <p>In Java 8, I know this is possible:</p>
  
  <pre><code>// someMethod is defined as: someMethod(AFunctionalInterface i)
  someMethod(someObject::someOtherMethod);
  </code></pre>
  
  <p>Question is: is it possible to do the following</p>
  
  <pre><code>AFunctionalInterface i = anObject::SomeMethod;
  </code></pre>
  
  <p>Also, is it possible to assign a lambda to a variable and pass it around, like so?</p>
  
  <p><code>Printer f = () -&gt; System.out.println(..); methodThatTakesPrinter(f);</code></p>