Java method can't be applied with Lambda expression
I've watched and read https://caveofprogramming.com/java/whats-new-in-java-8-lambda-expressions.html and I follow the same pattern I did for runner object which works fine. Runner runner = new Runner(); runner.run(() -> System.out.println("Print from Lambda expression")); Then, I try to create a simple interface and class to apply what I learned. I just want to replace the anonymous class with a lambda expression. My understanding is a lambda expression is a shorter code for the anonymous class and improve readability. So, I tried to initiate another instance called eucalyptus1 and try to @Override the grow() method, but my IDE error message said: grow() in com.smith.Eucalyptus cannot be applied to (lambda expression) Could anyone point me out what I misunderstand here? The code is below: // a simple interface interface Plant { public void grow(); } // apply interface to class class Eucalyptus implements Plant { @Override public void grow() { Syst...