Thread: ArrayLists
View Single Post
Old Nov 9th, 2006, 12:16 PM   #1
BungalowBill
Programmer
 
Join Date: Dec 2005
Posts: 40
Rep Power: 0 BungalowBill is on a distinguished road
ArrayLists

Im writing a program to find out if a protein sequence has a turn in it (don't ask) and this is what i want to do.

I need to enter a sequence, at the terminal, i.e. CAENBVWGKL or something then i need to convert this string into an array to separate it all up and give each letter its own place in the array. The rest becomes very complicated biology stuff so i won't bore you with it. I just need to crack this part.

ArrayList sequence = new ArrayList

//hopefully, eventually a list like this will be made somewhere.

sequence[] = ["C","A","E","N" etc.]

So if i tried to get sequence[2] i would get "A" back.

It seems like it should be pretty straightforward but i can't figure it out.

Does anyone know of any good resources where i can see examples of this kind of thing? I feel like i'm going round in circles with google searching for "converting strings to arrayList" and various similar conbinations.

Any help?
BungalowBill is offline   Reply With Quote