for long time , I always append a string in the following way.
for example if i want to get all the employee names separated by some symbol , in the below example i
For your final pipe issue, simply leave the last append outside of the loop
int size = EmployeeList.length() for(int i = 0; i < size - 1; i++) { final+=EmployeeList.getEmployee(i).Name+"|"; } final+=EmployeeList.getEmployee(size-1).Name;