Article View: chile.comp.programacion
Article #3119Re: Duda sobre crear objetos "distintos" en Java
From: Davor Buvinic
Date: Sat, 07 May 2005 17:41
Date: Sat, 07 May 2005 17:41
21 lines
1637 bytes
1637 bytes
qxm@cmet.net wrote: > Tengo una duda: > > �C�mo puedo crear ojbetos con distinto nombre en Java? > Se me ocurre usar un ciclo y usar el metodo new, pero el drama est� en > que necesito que los objetos se construyan algo as�... (con el > contenido de una variable de tipo String, que tenga concatenado un > n�mero) > obj01 > obj02 > etc. > pero dentro de un ciclo .... > > �Se puede hacer eso? > Revisa tu dise�o. Es necesario que mantengas las referencias a los objetos? Si lo necesitas, lo mejor ser�a que mantengas un arreglo con los objetos. - Davor
Technical Details
Message-ID:
<d5iujo$b1h$1@news1.nivel5.cl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mailReferences:
<1115413703.146063.225340@f14g2000cwb.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,c7ed06cee8eff92b X-Google-Attributes: gid1593cb,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mail From: Davor Buvinic <davor@vtr.net> Newsgroups: chile.comp.programacion Subject: Re: Duda sobre crear objetos "distintos" en Java Date: Sat, 07 May 2005 13:41:42 -0400 Organization: Varios Lines: 21 Message-ID: <d5iujo$b1h$1@news1.nivel5.cl> References: <1115413703.146063.225340@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: pc-96-66-83-200.cm.vtr.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news1.nivel5.cl 1115487672 11313 200.83.66.96 (7 May 2005 17:41:12 GMT) X-Complaints-To: news@news1.nivel5.cl NNTP-Posting-Date: Sat, 7 May 2005 17:41:12 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <1115413703.146063.225340@f14g2000cwb.googlegroups.com>