Method Reference In Java 8 - How it really works ?

preview_player
Показать описание
In this video, We will learn about the method reference in java 8 and how it really works.

Method references are introduced first in Java 8 and they can substitute a Single line lambda where within a lambda we just call a method.

Method reference in java are very readable helps to write clean code.

In this video We will learn the following :
1. what are Method references in Java ?
2. Difference Between Anonymous inner class, Lambda expressions and method references
3. Need of Method references in Java
4. How can we use method reference in Real time
5. We will be pretty much talking about using static method reference in this video.
6. Method reference can also be used for instance method and constructor and we will be talking about it in our next video.

timestamp
-------------------
00:00 - What is method reference in Java ?
08:39 - static method reference in java 8
24:07 - When should we use method reference over lambda ?
31:16 - method reference : return type confusion
49:15 - refer to sort() Using Consumer
52:49 - refer to sum() using BiFunction
58:16 - refer to equals() using BiPredicate
01:02:07 - A tricky usecase using Function and Consumer
01:12:28 - The Climax Mystery - String :: upperCase ?

For more free/paid courses visit

LINKS AND FREE LEARNING RESOURCES
========
Watch my new mock interview series for java developers

Watch my new Hello spring boot series

Watch Spring boot Hot topics

spring core

spring mvc

spring mvc intermediate

Spring JDBC

spring live project

SPRING SECURITY COURSE[NEW]

For more courses visit

Any time you are getting stuck with issues, Feel free to ask for support.

you can ping me on my Facebook page

Make sure to join my private Facebook page (Ask me here)
“SeleniumExpress - Support"

you can ask for support in my website forum

Follow me on Insta
Рекомендации по теме
Комментарии
Автор

you're the best teacher to teach any concept like a pro, Thank you so much for these sessions. and providing it for free.

Hari
Автор

Abhliash i have seen many youtube channel but one think i want to say u are the best and u explain everyconcept verywell with code

bipinsingh
Автор

It's like a twist buster at the end, you have mentioned it would work only static and method arguments should match, but the end it it worked with String::UpperCase, which creates an enthusiasm on how it worked.

lakshmojiseemakurthi
Автор

I've watched many videos on the Stream API, but none have been as clear as this one. Your teaching skills and explanations are excellent. Thank you for sharing such fantastic content.😇😇

asutoshkumar
Автор

That was an awesome explanation. I have read articles about method references but I understood it after watching this video only. Thank you for the video. 👏

keerthanashiyam
Автор

Bro your videos is really awesome. Very premium content

prasoonmishra
Автор

Its very helpful brother, I need deep knowledge of exceptions and multi threading is so helpful for us if you make videos on this 2 topic

asifshaikh
Автор

Loved your way of explanation. You are really a great teacher😍😇

rahulbhatanagar
Автор

Thanks a lot!! Was eagerly waiting for this. It feels like I can understand most of the things if you explain it. 👍👍

MalobikaNandy
Автор

Haha, I've been using method-reference, but the light bulb just turned on! 😂😂😂😂

villagesoftwareengineer
Автор

Hi Abhilash.. your videos are awesome... Can you take one session on generics in depth and multi threading as well

nasimkarpude
Автор

Knowledgeable video.waiting for stream api new video

mansinghyadav
Автор

Thanks ❤
Please keep it up this series 🙏

Vithal_Nivargi
Автор

@SeleniumExpress
I've been following this series and the content is incredibly detailed. In the third video, you introduced parallel streams, so I was expecting the next video to cover that topic. However, the latest video is on method references, which feels like a break in the flow. When will you be uploading the video on parallel streams?

sourabhkalaskar-xl
Автор

Hi avi your content is awesome how to by you course from Pakistan

depthprogramming
Автор

Can we expect Parallel stream next week?

santhoshchandran
Автор

Learned a lot. Big fan of your content! I have a question about method references. The main purpose seems to be code reuse. Since the methods already exist, why not just call them directly using the class name or object? For instance, instead of using a method reference like Collections::sort with an interface variable, we could just use Collections.sort() wherever needed. What specific advantages do method references offer?

ajaysubramaniam
Автор

Bro, where had you from last few months? We are waiting for you videos on java..

vijaykorke
Автор

Please continue core java concepts abhilash

prabhakarpn
Автор

I tried to buy the microservices boot camp course on your website but it says closed. How can I buy that course. Thank you.

Helloworld-vsey