17 Method Reference Using Double Colon (::) Operator

Published: 10 January 2022
on channel: coderolls
184
4

#Java8Features #MethodReference #DoubleColonOperator

How to write Lambda Expressions? ▶️    • 01 How To Write Lambda Expressions In Java?  

Example code can be found here: https://github.com/coderolls/java-8-f...

In this video, we will see the method reference using the double colon operator.

We use lambda expressions to write the implementation logic for the abstract method of the functional interfaces.

Sometimes, the functional interfaces call the extincting methods only. In these cases, instead of writing lambda expressions, we can refer to the existing methods.

Class can have static methods or instance methods, by using the method reference we can refer to both types of methods.

Watch this video to learn how we can use method reference with static methods and instance methods with a few examples.

This video is part of Java 8 Features Full Course. ▶️    • Java 8 Features - Full Course  

GitHub Repository Link: https://github.com/coderolls/java-8-f...

00:00 Recap
00:12 Why Method Reference Using :: is Needed?
01:40 Syntax for Static Method Reference
02:07 Syntax for Instance Method Reference
02:42 Example for Method References
04:00 Static Method Reference example
06:31 Instance Method Reference example
08:44 Conclusion

Buy me a coffee ☕: https://www.buymeacoffee.com/gauravku...

This is video is uploaded by codeRolls. Visit us at https://coderolls.com

Subscribe to my YouTube Channel ►    / @coderolls  

Follow us on:

Twitter ►   / coderolls  
Facebook ►   / coderolls  
Instagram ►   / coderolls  
Pinterest ►   / coderolls  


On this page of the site you can watch the video online 17 Method Reference Using Double Colon (::) Operator with a duration of hours minute second in good quality, which was uploaded by the user coderolls 10 January 2022, share the link with friends and acquaintances, this video has already been watched 184 times on youtube and it was liked by 4 viewers. Enjoy your viewing!