I want to return two objects from a Java method and was wondering what could be a good way of doing so?
The possible ways I can think of are: return a HashMap<
HashMap<
While in your case, the comment may be a good way to go, in Android, you can use Pair . Simply
return new Pair<>(yourList, yourCommaSeparatedValues);