Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java String Array without implicit size

Name: Anonymous 2008-02-19 7:36

hey people

I'm trying to get strings from a text inside a String array without implicit size

as if: cycle where method reads a line then stores into the array

Name: Anonymous 2008-02-19 17:38

>>8
Yeah, do use an ArrayList or similar to store them, not a regular array. What you can do with the Strings inside has nothing to do with the way you store them. You'll be calling them as String s = alist.get(i) anyway, so you'll be dealing with a regular String object.

Strings are immutable in Java, so swapping/removing chars is going to be annoying, but not particularly hard, thanks to String.toCharArray() and the fact that String can take an array of chars in its constructor.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List