I’ve a string which contains data concatenated by pipe (|)
Example: 5|aa@gmail.com|477|en|87477
The string has ~15 fields concatenated by pipe.
It could be possible that some field may have empty data:
Example: 5|aa@gmail.com||en|87477
How can I efficiently get all the individual fields in Java 1.6?
Thanks!
Consider using the Split method offered by java
The output i get is
As it’s just an array of string you access the data as you want, ie data[1] gives aa@gmail.com