separator : Java Glossary
A congenital genetic defect carried by the majority of most Java programmers prevents
them from spelling the word separator correctly. Whether you use / or \ as
the file separator is controlled by the system property File.separatorChar.
A common coding problem is you have a set of fields and
you wish to combine them, separating them with some character e.g. a comma, or a
string e.g. <br>. You want separators only
between the fields, not terminators after each
field. Another way of looking at it is you put a separator before every item except
the first. Here are a number of ways of accomplishing that task.
Daniel Pitts suggested using Apache Commons and use StringUtils. join(). He further pointed
out that in JSP (Java Server Pages) you can use the varStatus.last or first property.