Link to home
Start Free TrialLog in
Avatar of anup001
anup001

asked on

convert string to an array java

Convert string like "abc,etc,sdq,sds,dse" to an array of 5 strings using java?
Avatar of marklorenz
marklorenz
Flag of United States of America image

You need to use a StringTokenizer with a comma as the field separator.  Check it out here:

How to break a String into tokens with the StringTokenizer class
http://www.devdaily.com/java/edu/pj/pj010006/pj010006.shtml
ASKER CERTIFIED SOLUTION
Avatar of Ajay-Singh
Ajay-Singh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anup001
anup001

ASKER

Thanks Ajay