Java Method References - A Beginner's Guide
HTML-код
- Опубликовано: 10 фев 2025
- Discover the power of Java Method References in this beginner-friendly guide! Learn how to write cleaner, more expressive code with this Java 8 feature. We'll cover:
What method references are and why they matter
The four types of method references
Practical code examples for each type
How method references can boost your productivity
Whether you're new to Java or looking to level up your skills, this video will help you master method references and improve your coding efficiency. Get ready to simplify your lambda expressions and streamline your functional programming approach in Java!
🔗Resources & Links mentioned in this video:
Blog Post: www.danvega.de...
GitHub Repo: github.com/dan...
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: / therealdanvega
Github: github.com/dan...
LinkedIn: / danvega
Newsletter: www.danvega.de...
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️ Наука
I already knew that, but it was nice to make sure that i still had that knowlage!
always glad to watch your videos
More quality java content is always nice, ty Dan
I still remember how Intellij taught me about this feature of Java ! It was the first time i learnt something from an IDE. Great experience 😅
The way you are explaining is fascinating ❤
Hi Dan, can you please make a video about heap and thread dumps. How can we investigate them, which valuable data can we retrieve, and how to operate efficiently with it
After "A Beginner's Guide", next one defenetly should be "video about heap and thread dumps". Totally agree! 👍
Thanks! You are TOP!
Thanks! good examples.
If you're planning on doing more of these Java ones, could you consider a Beginner, Intermediate and Advanced tutorial on Optional. Particularly focusing on refactoring a method that checks for null the old way.
Hey Dan nice vidoes, please show more content about stream processing with spliterator and how to work efficiently in parallel
thanks dan
Please create content on ThreadLocal.
5:35 but println is not a static method. Isn't that what you call a bound receiver?
Can you make a video about spring websocket (and security)?
Hi Dan, could you look into reactive Java? Ive seen it used alot with Spring.
Another great video. Thanks Dan! One thing I'm still puzzling over: Why the :: syntax? If I want to use a method I use the dot operator, like: object.method() and in some other languages, if I want a reference to the method I can just use the dot without calling the method to get a reference to the method, see: object.method. Is there a reason why there's a specific syntax that seems to me to be dedicated to getting a reference to a method, as opposed to using a syntax that is consistent with accessing other properties on an object (the dot operator)? Maybe there is something fundamentally different about accessing method references vs other object properties that I am missing because Java is not my first programming language?
Bit confused, so for the reference to a constructor, this would only work if there is only one constructor in a class? Just trying to understand how it would know if there is more than one.
How does using unnamed classes gonna change the current spring boot development ?
can you share you code style formatting file like example.xml
Without IDEs to help it make it harder to read the code as the signature of the method is hidden by this syntax. To be fair almost very one uses IDE. Conciseness is not always good. I feel the same way about Java allowing dropping types for lambdas.
More streams
if you're using java 21, why not use a unnamed class, new { ... } and you avoid to write all that bolierplate code
That is a preview feature and while I like using it someone new to Java may not understand how to enable that or care for that matter. It's going to be in preview again in JDK 23 but I love this feature and am absolutely looking forward to it.
@@DanVega ok i got it, can you do a video about stream or functional interfaces in java? both are interesting topics
@@haroldpepete👍👍
System.out.println is NOT a static method
I hope you are well. Visiting your channel I have seen your all videos and content are very good but your video SEO optimization is not professional. Perhaps you are busy for managing the channel
First, mofo.