Java 8 Method and Constructor References: Simplifying Code and Boosting Efficiency - Explained!

  Рет қаралды 23,961

Engineering Digest

Engineering Digest

Күн бұрын

🟡 Get 1 to 1 coaching with me: topmate.io/eng...
🟡 Donate: paypal.me/engi...
🟡 Perks: www.youtube.co...
🔴 Discord: / discord
🔴 Twitch: / engineeringdigest
🔴 Personal KZbin Channel: / @thevipulvats
🔴 Instagram: / thevipulvats
🔴 Twitter: / thevipulvats
🔴 LinkedIn: / thevipulvats
🔴 Website: engineeringdig...
🔴 Video summary
In Java, Method References and Constructor References are shorthand notations for lambda expressions that can be used to simplify the code and make it more readable.
A Method Reference is a shorthand notation for a lambda expression that invokes a method. It provides a way to refer to an existing method by name instead of specifying a lambda expression that defines a new method. Method References are used to simplify lambda expressions that call a single method with a single parameter.
A Constructor Reference is a shorthand notation for a lambda expression that creates a new object using a constructor. It provides a way to refer to an existing constructor by name instead of specifying a lambda expression that defines a new constructor. Constructor References are used to simplify lambda expressions that create new objects.
Method References and Constructor References can be used with functional interfaces, which are interfaces that have a single abstract method. They can be used in place of lambda expressions when the lambda expression is simply invoking a single method or constructor.
Overall, Method References and Constructor References can help to simplify code and make it more concise and readable by reducing the amount of boilerplate code needed for simple lambda expressions.
🔴 Timestamps
Intro 0:00

Пікірлер: 43
@fazlurrehmanejazahmad6068
@fazlurrehmanejazahmad6068 Жыл бұрын
video samapt ho gai he !!... hats off sir !!
@EngineeringDigest
@EngineeringDigest Жыл бұрын
Thanks a lot. I have a favour to ask. Can you share this playlist on LinkedIn. It would be huge help 🤝
@rohithguptha
@rohithguptha Жыл бұрын
I binge watched this whole playlist, thank you for teaching, it was very informative and precise.
@EngineeringDigest
@EngineeringDigest Жыл бұрын
You're very welcome!
@azhargayawi
@azhargayawi 28 күн бұрын
Video samapt ho gyi h to Samajh me v aa gaya h Thank you
@mnaresh5025
@mnaresh5025 11 ай бұрын
Sir super u r fabulous , fantastic, unbelievable teaching
@shubhrarawat311
@shubhrarawat311 5 ай бұрын
This is a great video for clear and concise understanding of method referencing! Great content.
@SarwarAkbar-c5u
@SarwarAkbar-c5u 2 ай бұрын
You are awesome.....Arrow hits straight into the mind.....Thanks a lot
@divijbalota4790
@divijbalota4790 8 ай бұрын
thanks bhai, for speaking in hindi specially😃
@vinayakmishra2365
@vinayakmishra2365 5 ай бұрын
Ek Trfa 😎!! The man behind Tollywood voiceovers - truly a legend!
@Eck_Gaming
@Eck_Gaming Жыл бұрын
The best ❤
@greymatters22
@greymatters22 8 ай бұрын
"Kuch bi samjh me nahi aaya he " , :D lol , so relatable
@rahulgupta373
@rahulgupta373 7 ай бұрын
Awesome explanation
@NjoyTheLife
@NjoyTheLife 6 ай бұрын
Awesome thanks to youtube algorithm for prompting this channel, super explanation bhai keep rocking
@EngineeringDigest
@EngineeringDigest 6 ай бұрын
Thank you so much 😀
@stockwonders
@stockwonders 7 ай бұрын
Very Nicely Explained
@YashSingh-xs5yj
@YashSingh-xs5yj 5 ай бұрын
Great tutorial
@vishalit2881
@vishalit2881 9 ай бұрын
bro sir mate u cleared my doubt clearly and nicely appreciate
@aabajirakate3586
@aabajirakate3586 Жыл бұрын
thanks so much sir, so great playlist sir,
@EngineeringDigest
@EngineeringDigest Жыл бұрын
Thanks! 😊 you can join our discord or Insta @thevipulvats.
@riteshghule_patil7807
@riteshghule_patil7807 Жыл бұрын
how can we use constructor refence if constructor takes more than one parameter ... and is it possible ? Well thanks for great video
@milankushwah8580
@milankushwah8580 9 ай бұрын
You can do it like this: public class Main { public static void main(String[] args) { // Define a functional interface with two parameters (name and age) BiFunction personFactory = Person::new; // Use the constructor reference to create a new Person instance Person person = personFactory.apply("John", 30); System.out.println("Name: " + person.name); System.out.println("Age: " + person.age); } }
@adityaraj7309
@adityaraj7309 9 күн бұрын
Stream krke khelne ke layak bnaya was dark 💀
@monika498400
@monika498400 7 ай бұрын
bro, when I Started watching your video, I was bit annoyed by your speed of speech... but abb habit padd gai sunne ki... and abb sirf hasi ati rehti hai... on ur sense of humor between teaching... and haa kuch bhi samajh nahi aya obviously...
@arifcharan
@arifcharan 4 ай бұрын
How to pass the values for parameterized constructor make one videos on parameterized parameters like insta,static method and constructor
@nishapawar3368
@nishapawar3368 Ай бұрын
no time wastage only thangs that u need to know 🙂
@motivational_tune5619
@motivational_tune5619 Жыл бұрын
Java 9 , 11 , 17 features per banao
@EngineeringDigest
@EngineeringDigest Жыл бұрын
1922 videos coming tomorrow
@dhananjaygavnang6403
@dhananjaygavnang6403 4 ай бұрын
@@EngineeringDigest I am not able to see any video on Java 9, 11, 17 feature on our channel. please help!!
@Gajendra-p3k
@Gajendra-p3k 3 ай бұрын
❤❤❤💖
@savantdhindsa7910
@savantdhindsa7910 Жыл бұрын
mundeya tera attitude kaim aa ...
@ncertmathclasses8236
@ncertmathclasses8236 Жыл бұрын
Stream api and date api
@EngineeringDigest
@EngineeringDigest Жыл бұрын
sure
@ncertmathclasses8236
@ncertmathclasses8236 Жыл бұрын
And microservice design patterns 👏
@sunilbandaru
@sunilbandaru 11 ай бұрын
koi rocket science nhi hi!
@AsifKhan-cb3hj
@AsifKhan-cb3hj 7 ай бұрын
Ex ganna/gaana
@EngineeringDigest
@EngineeringDigest 7 ай бұрын
lol
@EngineeringDigest
@EngineeringDigest 7 ай бұрын
u r the 3rd one to notice i guess after me and my editor
@yashlokhande2890
@yashlokhande2890 13 күн бұрын
Kuch bhi samjh me nahi aya he 😅😅
@anilnayak5642
@anilnayak5642 8 ай бұрын
copy pasted. khali phokat ka attitude. is se better explanation youtube me upload hua hai.
@EngineeringDigest
@EngineeringDigest 8 ай бұрын
Haha
@Gajendra-p3k
@Gajendra-p3k 3 ай бұрын
To bhai tu ye kyu dekh reha hai 😀😀😀
@anilnayak5642
@anilnayak5642 3 ай бұрын
@@Gajendra-p3k bhai agar dekha hota toh aur time barbad nahi karta comment likh ke. Bhai ka attitude dekh k flat ho gaya me
Java 8 Streams Ultimate Tutorial: All You Need to Know in One Video
30:04
Engineering Digest
Рет қаралды 53 М.
Master Optional in Java 8: Complete Guide for Beginners
15:30
Engineering Digest
Рет қаралды 20 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
Method Reference In Java 8 - How it really works ?
1:20:27
Selenium Express
Рет қаралды 9 М.
How to NOT Fail a Technical Interview
8:26
Fireship
Рет қаралды 1,6 МЛН
Java Method References - A Beginner's Guide
12:59
Dan Vega
Рет қаралды 9 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 919 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 341 М.
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 801 М.
Java String vs StringBuilder vs StringBuffer: Best Practices & Performance
13:15
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН