Re: Array Question
From: Andrew Dixon (da644_98_at_NOREPLY.yahoo.co.uk)
Date: 12/21/03
- Next message: Denz: "Re: Java on Web"
- Previous message: Chris: "Re: Array Question"
- In reply to: Chris: "Re: Array Question"
- Next in thread: Anthony Borla: "Re: Array Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 21 Dec 2003 22:02:03 -0000
Excellent. Thanks. All working now.
Best Regards
>>> Andrew Dixon
"Chris" <chris2k01@hotmail.com> wrote in message
news:0hoFb.15037$ss5.8580@clgrps13...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew Dixon - Depictions.net wrote:
>
> > Hi Everyone.
> >
> > Bit new to Java and I have question about arrays. I have wrote some
> > code to look for certain substrings within a larger string which
> > work fine. I would like to store each substring in an array, however
> > I don't know how many there will be. All the example I have found
> > for arrays only show how to predefine the size of the array, however
> > I would like to expand it by one each time I need to. Can anyone let
> > me know how to do this.
> >
> > Thanks
> >
> > Best Regards
> >
> >>>> Andrew
>
> Hi,
> I think you'd like to try using java.util.ArrayList. It's really
> simple to use, you can keep adding objects over and over without
> knowing the initial size, and you can convert it to a real array when
> you're finished very easily. Take a look!
>
> - --
> Chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
>
> iD8DBQE/5eaQwxczzJRavJYRAqqbAJ46RB8qDqoy5FjXtZ2cFa2rNGan6QCfa67F
> hKzHPH2mx0Ufg8RKWbttnrc=
> =G2b8
> -----END PGP SIGNATURE-----
- Next message: Denz: "Re: Java on Web"
- Previous message: Chris: "Re: Array Question"
- In reply to: Chris: "Re: Array Question"
- Next in thread: Anthony Borla: "Re: Array Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|