🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8697

Re: Declaring an Array of Strings?

#8697
From: Marcel Gabi
Date: Thu, 08 Mar 2001 02:14
25 lines
1565 bytes
String mystring = new String(""); creates a new empty string just like
String mystring = ""; would do.
Check out the different constructor to find out more about how
to create strings.
http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

Regards,

Marcel

Harry Whitehouse wrote:
> Hmmmm... This should be simple, but I get compiler errors:
>
>  String AddressLine[];
>
>  for(int i=0;i<7;i++)
>          AddressLine[i]= new String;               // line 208
>
> "Applet.java": Error #: 201 : '(' or '[' expected at line 208, column 36
>
> Can anyone clue me on this one?
>
> TIA
>
> Harry
Technical Details
Message-ID: <3AA6EB0F.5FC25D07@borland.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!10.143.12.99
References: <3aa6df5f$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,9324d780b1c839d2
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-07 18:24:05 PST
Message-ID: <3AA6EB0F.5FC25D07@borland.com>
Date: Wed, 07 Mar 2001 18:14:39 -0800
From: Marcel Gabi <mgabi@borland.com>
Organization: Borland Software Corporation
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Declaring an Array of Strings?
References: <3aa6df5f$1_2@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.143.12.99
X-Trace: 7 Mar 2001 18:16:06 -0800, 10.143.12.99
Lines: 27
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!10.143.12.99