separator : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

separator
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:

http://mindprod.com/jgloss/separator.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\separator.html
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.

IP:[65.110.21.43]
Your face IP:[3.138.134.247]
You are visitor number