Java 8 Lambda Basics 9 - Lambdas vs Interface Implementations

PRESS TO DOWNLOAD:

— Handwritten subtitles — Generated subtitles

Start Reading:

now I want to talk about the difference between this thing here which is the hollow while treating and the smile and the function here both of them are of type greeting right let me get rid of this greet method or maybe put this way below so look at these two lines line 13 and line 14 line 13 is basically an instance of a greeting interface which is a custom class that we have written we written this lol greeting which implements the leading interface line 14 is al and expression there a lambda expression and we learned that a type of a lambda expression is basically an interface that has a method of that type so since this match is here we have of type rating and the compiler is really happy now the question is what the difference between this and this what the difference between hello world greeting and let me change the name for this thing lambda greeting right what are they the same are they different hello while greeting is an instance of a specific implementation which also happens to do the exact same thing which just happens to print hello world so