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.

Inserting Delimiters

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.

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number