17 Method Reference Using Double Colon (::) Operator

Publié le: 10 janvier 2022
sur la chaîne: 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  


Sur cette page du site, vous pouvez voir la vidéo en ligne 17 Method Reference Using Double Colon (::) Operator durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur coderolls 10 janvier 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 184 fois et il a aimé 4 téléspectateurs. Bon visionnage!