+ 1
Como en que situaciĆ³n se utiliza return?
2 Answers
+ 2
thanks!!
+ 1
Returning values from a method is the most common way to pass information to the calling method. The other way is to have shared data and, depending on it's scope, is frowned upon. Designing using OOP ( object-oriented programming) means that data's scope must be limited to as little code as makes sense. When you make globals that are modified everywhere, you make code that is difficult to test.