String vectors
794681Dec 18 2008 — edited Dec 18 2008This may seem absolutely insane to ask to some of you, but how can I change a string in a string vector?
I know how to create a vector, get a value, and store strings for a first time, but not how to reset an element.
Vector<String> StrVec = new Vector();
StrVec.add("Hello");
StrVec.add("World");
System.out.println(StrVec.get(0));
I mean, it'd be nice if I could just StrVec.get(0)="New str"; but I can't.
I couldn't find anything useful with strings and vectors on google. All of the search results I waded through were either only setting it for the first time, or just not dealing with strings at all.