Common Java Skill : Multiple Return Values like Go 🚀 | @Javatechie

preview_player
Показать описание
#JavaTechie #corejava #SpringBoot

👉 In this tutorial we will understand how to return multiple values in Java using the Apache Commons Lang library

🧨 Hurry-up & Register today itself!🧨

Devops for Developers course (Live class ) 🔥🔥:

COUPON CODE : NEW24

Spring boot microservice Premium course lunched with 70% off 🚀 🚀

COURSE LINK : Spring boot microservice course link :

PROMO CODE : SPRING50

GitHub:

Blogs:

Facebook:

Join this channel to get access to perks:

🔔 Guys, if you like this video, please do subscribe now and press the bell icon to not miss any update from Java Techie.

Disclaimer/Policy:
📄 Note: All uploaded content in this channel is mine and it's not copied from any community, you are free to use source code from the above-mentioned GitHub account.
Рекомендации по теме
Комментарии
Автор

We used to create our own pair classes to use in project. Now it's cool to have ready to use libs. Thank Techie

ascar
Автор

I have implemented this concept in one of our existing methods after watching your video. You are awesome!

manoganesan
Автор

Appreciate your efforts Basant! God Bless you!🙏👍

gopisambasivarao
Автор

Thanks buddy. Every time i got a notification from you , got curious to learn new thing to build my carrier growth.

jaganathanmurthy
Автор

Return a list of POJOs. Another way to implement this. Like in all languages, different ways to perform such tasks.

smacdonald
Автор

Thank You Basant Bhai, I was not aware about these fantastic classes. Thank you for sharing it, now I will try to use this in my project.

jrdillip
Автор

Please do not use this, the readability is so much lower. Multiple return values are a sign of too much responsibility or a lack of domain understanding. We create on purpose objects that hold values to communicate intend or coupling.
In Go we use them to return value, error that is a totally different approach.

soto
Автор

Thanks sir to share this knowledge 🙏, even though i used Pair class many times in my code.

gouravkumar-orjy
Автор

Kotlin has this feature and I find it awesome.

El_Espada
Автор

Interesting Video. Thanks for sharing Basant.

raghavanaliassaravananm
Автор

This common lang3 will reduce writing multiple methods, thanks for the info ❤

saravanasathish
Автор

This was awesome Basant..thank you for the learnings

rudrajitgupta
Автор

What might be the benefits of adding a library to do that when you can achieve the same by creating a object that contains the others nested objects?

MrKKPA
Автор

Please do the video on remove duplicates in custom objects by using key using java stream api.

Your videos are so boosting up my skills a lot.Thank you so much

saim
Автор

I believe it is better to create a Dto class that contains those two objects and return the Dto object

bugra
Автор

How will this be useful if the number of objects to be returned are more than three?
Considering readability and convenience, this feature looks good. As per my understanding, we can come up with our custom class containing these multiple records to be returned.

samsneera
Автор

Thanks.. it is very useful for developers ❤👍

MurariKumar-wptd
Автор

Though this makes it more object oriented, in the old days I use pass such object by reference to the method arguments. You can send back more than 3. Only it is mutable and open to side effects.

Nilcha-
Автор

We can use pojo class instead, which would be more cleaner and easy to understand approach, this approach creates confusion for new devs

maheshwer
Автор

Hi Basant, I need some suggestion regarding one of the requirement.
I need to reterieve the data one of the database table, it has morethan 3 lakhs records (for first time), 1. I need to call some 3rd party API for each rows and get some relavent details from API resonse and then I need to update same row with other 2 fields. So how we can handle entire thing in same request and wtih in same end point. (bascially retreive data, do same change in row, update same row for those many records).
2. This can be run on weekly batch. ( may be first time 3lakh records, later batch run it might be less), based on flag in DB column we can identify allread processed or not processed rows.

devaamujuri
welcome to shbcf.ru