Article View: borland.public.jbuilder.java.language
Article #194Array problem
From: Raul Lorenzo
Date: Thu, 25 May 2006 17:59
Date: Thu, 25 May 2006 17:59
25 lines
1450 bytes
1450 bytes
Hello,
I have this piece of code
/***************************************************/
int index=0;
AttributeREM RoleREM[]=null;
RoleREM=new AttributeREM[asociationREM.numero_roles];
RoleREM[index].oid="hello";
/***************************************************/
Java reports me a null Pointer exception at RoleREM[index].oid="hello";
Why?
asociationREM.numero_roles is always >0
AttributeREM is a class something like this
class AttributeREM
{
public String oid;
public String name;
...
...
};
Thanks in advance
Technical Details
Message-ID:
<4475f04d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!38.119.100.148.MISMATCH!news-out2.newsfeeds.com!local!sp6iad.superfeed.net!in2.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f74b3,a661d771a96526a0,start X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit Subject: Array problem From: Raul Lorenzo <rlorenb@agalisa.es> Date: Thu, 25 May 2006 19:59:40 +0200 Message-ID: <4475f04d@newsgroups.borland.com> Lines: 26 NNTP-Posting-Host: 83.38.29.200 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!38.119.100.148.MISMATCH!news-out2.newsfeeds.com!local!sp6iad.superfeed.net!in2.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail Newsgroups: borland.public.jbuilder.java.language X-Trace: newsgroups.borland.com 1148579917 83.38.29.200 (25 May 2006 10:58:37 -0700) User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit