17 Method Reference Using Double Colon (::) Operator

Pubblicato il: 10 gennaio 2022
sul canale di: 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  


In questa pagina del sito puoi guardare il video online 17 Method Reference Using Double Colon (::) Operator della durata di ore minuti seconda in buona qualità , che l'utente ha caricato coderolls 10 gennaio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 184 volte e gli è piaciuto 4 spettatori. Buona visione!