|
-
January 11th, 2012, 01:51 AM
#1
NullPointer Exception
i'm making an array of Point objects........
but getting the exception........
Point[] p = new Point[corpsDestroyed];
for(int j=ind+3,k=0; j<s.length(); j+=6,k++)
{
p[k].x = (int)(s.charAt(j)-48);
p[k].y = (int)(s.charAt(j+2)-48);
if(j == s.length() - 4)
break;
}
here "s" is a string of no.s n char........from where i m taking the x & y components.......
"ind+3"=index of the 1st no. in the string.........
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|