
-----------------------------------
skada
Wed Feb 11, 2009 1:49 am

Splitting strings from a list
-----------------------------------
I need a little help, very confused.

I have a List and I need to get at the stuff inside the list so I can split it. I know how to split strings. I'm just not sure how to split the strings in a list. I tried splitting the List, my program doesn't like that. I've tried moving it to a string using iterators but all the commas got lost. 

Any help is very appreciated. Thank you.

-----------------------------------
DemonWasp
Wed Feb 11, 2009 2:42 am

RE:Splitting strings from a list
-----------------------------------
I'm not sure I understand entirely. What are you trying to get out of the List  ? What do you need it for?

If you need to retrieve a given String from the list, you can just use listName.get(index) to retrieve the String at index from the list. Indicies start from zero.

-----------------------------------
S_Grimm
Wed Feb 11, 2009 12:29 pm

RE:Splitting strings from a list
-----------------------------------
Some code MIGHT be helpful here, along with a detailed explination of EXACTLY what you need to hav happen and where it should be in the code

-----------------------------------
skada
Wed Feb 11, 2009 6:07 pm

RE:Splitting strings from a list
-----------------------------------
The listNam.get() actually helps a lot. The book I'm looking at doesn't have that in it for some reason. Thank you, the was essentially a breakthrough. Thanks.

-----------------------------------
Vermette
Thu Feb 12, 2009 11:25 am

Re: Splitting strings from a list
-----------------------------------
You can consult the javadoc on the List interface in order to see what's available to all the Collections using that interface:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html

Here's the docs on String, should have whatever else you're looking for:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
