Really awesome Tutorials on Lambda! Thanks Koushik! Just to add a small point on the subject, if we take a look at the compiled .class files, we could see that Lambdas as never converted to .class files. At the same time we can see Anonymous inner class getting converted to individual .class files. This behavior can be correlated to the fact that Lambdas are not syntactical sugar over anonymous inner class, but a different thing on its own.
@botrate4123 жыл бұрын
Wow after spending 1.5 yrs in java today I got to learn something new about lambda
@83kumarvishal7 жыл бұрын
actually when you see the .class files, we wont see any inner class starting with $.. that explains lambda are not converted as anaynomus inner class
@readerwriter-gf5iy6 жыл бұрын
Sir ji awesome! I came to this clip from your fist clip from this tutorial series.
@OvidiuCONEAC7 жыл бұрын
Excellent explanation! Thank you!
@elmehdisaniss27314 жыл бұрын
You are very awesome ! I'm learning so much from you ! Thank you so much.
@adelsalaheldeen5 жыл бұрын
These videos are awesome really. I just have one small question in this video and hope someone sees my comment. In demonstrating the anonymous inner class with "this" reference ( before adding the toString method override), why it prints an instance of ThisReferenceExample class, not the inner class (on 3:49)?
@4jilson5 жыл бұрын
Actually, it prints the instance of the inner class, the name of the inner class is displayed after the $ sign, As the inner class is an anonymous class hence its name is like some code value. You can check this code github.com/jilsonjoseph/Java/blob/master/Inner%20Class/Main.java it displays the name of Inner class as I have used a name for my inner class (because here my class is not an anonymous class).
@haolinzhang532 жыл бұрын
Same question.
@rookiecookie478 жыл бұрын
that's why anonymous classes and lambdas are different things
@MrAbbydarappa6 жыл бұрын
Add to it the fact you cannot have more than 1 method?
@yashkumarm7434 жыл бұрын
one Question even when you print this object in the Anynomus Inner class it prints ThisReferenceExample only not the Process Object could you please check that
@thenullpointer63863 жыл бұрын
in the Anynomus Inner class it prints ThisReferenceExample -> it prints the inner class reference only, there is a $ symbol in the output. which shows inner class object
@amitmahto683 жыл бұрын
public class ThisReferenceExample{ public static void main(String[] args) { Process w=new Process() { @Override public void process(int i) { // TODO Auto-generated method stub System.out.println(this); } }; w.work(0); } } This example is also printing the reference to ThisReferenceExample. Does interfaces when directly implemented as anonymous inner class,also not touch the "this" reference?
@haolinzhang532 жыл бұрын
Same question ...
@murthyinutube Жыл бұрын
a lambda expression is a concise way to represent an anonymous function, that can be used as an argument for functional interfaces. One key characteristic of lambda expressions is that they capture the values of variables from their enclosing scope. However, when using this within a lambda expression inside a static method, you might encounter an error or unexpected behavior. This is because this refers to the instance of the current class, and in a static context, there is no instance context available. - When a lambda expression is used within an instance method, it can access instance variables and methods using this. - When a lambda expression is used within a static method, it cannot access instance variables and methods using this, as there is no instance context in a static context.
@onlinetvoffical6 жыл бұрын
Awesome videos! Please prepare advance lambda
@ramlakhan-fp7ct5 жыл бұрын
Can you please upload a course related to streams, Grouping and ParallelStreams ?
@JustFw68815 жыл бұрын
Please can anyone explain why it's not a static method anymore? 7:25
@dennyjames61205 жыл бұрын
Because he wanted to demonstrate how 'this' behaves in the context of a lambda. He would get a compiler error if he tries to access 'this' on a static method.
@perschistence26514 жыл бұрын
Uff the javabrains.io link seems to be down.
@aaroldaaroldson7087 жыл бұрын
So is it the only difference?
@kapilthukral618 Жыл бұрын
this reference behaves in the same way in javascript lambda functions(anonymous functions) as well.
@jaykishankapat412845 жыл бұрын
excellent
@TheGuroguro128 жыл бұрын
Thank you very much.
@samw46298 жыл бұрын
hibernate jdk8
@TheYogi0037 жыл бұрын
8:10 That === though.
@Java.Brains7 жыл бұрын
See kids? This is what happens when you code in both Java and JavaScript!
@kidslearningscience6 жыл бұрын
Can you please create a video on datadog configuration.
@sonaraw48954 жыл бұрын
Excellent course!!!!!!!!!! Request you to add one more playlist on streaming in details would be highly appreciated.
@csamarnathreddy8 жыл бұрын
can anyone please suggest a tutorial on Spring Boot
@karuppuswamybe8 жыл бұрын
Search for Spring boot by java brains.
@satyas31364 жыл бұрын
Awesome video, but no doubt why java is lagging behind Python, when python is bringing new API wrt AI , ML , DS java is focussing on this nonsense stuff of rewriting same stuff in different way.
@emadrefai93804 жыл бұрын
Great work , really useful , I've just one comment or advice , try to make the video shorter by focusing on the important parts , with all my respect