+ 3
Can 1 method return 2 answers?
4 Answers
+ 7
You can return an array to return multiple values, if that's what you're after.
Also possible to use if-then style or switch to change return value based on input.
+ 3
It depends on the language. In some languages you can also return "tuples". If the language doesn't support tuples you can create your own class with the multiple values you want returned. Another alternative is passing values by reference.
+ 2
Thanks brother, that's what I was researching
0
No problem mateo, and thank you Jayden.