17 Method Reference Using Double Colon (::) Operator

Опубликовано: 10 Январь 2022
на канале: 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  


На этой странице сайта вы можете посмотреть видео онлайн 17 Method Reference Using Double Colon (::) Operator длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь coderolls 10 Январь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 184 раз и оно понравилось 4 зрителям. Приятного просмотра!