This content has been marked as final. Show 3 replies
What is your question?
This is not a code generation service, so it helps to:
<li> Show the best attempt you have made so far.
<li> Explain exactly how the required output differs from the actual output of your code.
<li> Ask a specific question.
Also, please fix those sticky '.' & '!' keys.
Handy reading would be How To Ask Questions The Smart Way (http://catb.org/esr/faqs/smart-questions.html).
I'm going to answer this, although I shouldn't - sometimes all you need is to just know the name of a function that is really easy for someone to tell you rather than spend hours looking for it (or making your own implementation that is rubbish and takes ages)
searching for "splitting a string java" on google produces, at the first result, http://www.rgagnon.com/javadetails/java-0438.html describing exactly what you need. The person above asked you to "give it a go" to produce a better question because if you had, you would have most likely found the answer in the time it took me to write this answer.
Edited by: 794057 on 01-Nov-2010 03:57
806641 wrote:Another suggestion: Step back from the details and work out what your problem is. Java is an object-oriented language, and it might be better to ask yourself if there's a class you could write that might help (eg, StaffMember?).
i.e. I wanted to separate role field by comma for same staff number and wanted to remove second row of same staff number.