title: Lambda Expressions for Abstract Classes
body: <p>I have an abstract class with one abstract method. How can I use lambda expressions to instantiate it. It cannot be made into an interface because it extends a class. </p>
  
  <pre><code>public class Concrete&lt;T&gt; {
      // Has a bunch of predefined methods.
  }
  
  
  public abstract class Abstract&lt;T&gt; extends Concrete&lt;T&gt; {
      public T getSomething();
      // Uses inherited methods from Concrete class
  }
  
  public class Driver {
      public static void main(String[] args) {
          System.out.println(new Abstract&lt;String&gt;() {
              public String getSomething() {
                  // Returns something using inherited methods from Abstract              
                  // Class and Concrete Class
              }
          });
      }
  }
  </code></pre>