Article View: borland.public.jbuilder.java.language
Article #17786Re: Array of Strings: How?
From: Chris Hill
Date: Thu, 01 Oct 1998 00:00
Date: Thu, 01 Oct 1998 00:00
26 lines
1069 bytes
1069 bytes
Your code looks file and compiles for me. Perhaps there is a problem
with the other code in the file?
On Thu, 01 Oct 1998 16:07:30 GMT,
paul.gifford@ibm.take.me.outta.here.net (Paul Gifford) wrote:
>
>
> I want an array of strings. Here's sample code:
>
> String names[] = new String[10];
> names[0] = new String("Bob Smith");
>
> Which is apparently the correct syntax according to "Java By
>Example" (from Sun). However, I get error "(37) ']' expected, with
>the cursor positioned after "names[" on the 2nd line.
>
> What's my mistake?
>
>TIA
>
>p
>
Chris Hill
hillca@cs.purdue.edu
Technical Details
Message-ID:
<3613d088.131866343@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3613a7dc.5144351@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,4bb9832368efc845 X-Google-Attributes: gidf74b3,public From: hillca@cs.purdue.edu (Chris Hill) Subject: Re: Array of Strings: How? Date: 1998/10/01 Message-ID: <3613d088.131866343@forums.borland.com> X-Deja-AN: 396780952 References: <3613a7dc.5144351@forums.inprise.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language