This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes parsing comma delimited string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "parsing comma delimited string" Watch "parsing comma delimited string" New topic

parsing comma delimited string

jimbo jawgar

Joined: Oct 25, 2004
Posts: 4
I there a class & method to parse a comma delimited string
Something like
SomeClass sc = new SomeClass("abc,efg,hij");
String s = sc(1,",");



String method split(",") worked fine. Thanks alot
[ November 02, 2004: Message edited by: jimbo jawgar ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
StringTokenizer(), or, if you have java 1.4+, String.split()
Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Hope this will work out for you.

Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

also refer to this thread
[ November 03, 2004: Message edited by: Shailesh Chandra ]

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
I agree. Here's the link:
subject: parsing comma delimited string
It's not a secret anymore!