return "";
just returns an empty string.
If you put alist.get(i).getCountry()
outside of the for loop it will not make sense. (I’m assuming that’s what you mean by “end the body with that.”) It depends on i
, which only exists in the loop.
It’s tough to see why you’re getting that error without seeing more of your code.
1
solved What does return “” mean? [closed]