posted 13 years ago
sort of yes.
foreg -
here, if later on, we want to return one more element from testMethod then we can modify ReturnObject class and testMethod
for eg
i would personally appreciate returning the Collection from a method rather than instant of "ReturnObject" class.
for eg
Using arrayList , we can completely do away with RetrunObject class.
Now for eg - if we need to return one more value from method then our code will be