Class person{
int name;
};
I have a scenario here in which i’m parsing a set of Person objects from an arraylist.
I need to concatenate all the name(member variable) for the objects in the arraylist seperated by an “or”.
I have tried some conventional ways of adding an “or” at the end of each concatenation and
removing one “or” from the end of the string.
I know this is no good programming.
this is indeed the way to go. I assume you have an arraylist since you tagged it, you can use: