Hi,
Can you please provide the code.
Nirmal
\\\///
/ \
| \\ // |
( | (.) (.) |)
----------o00o--(_)--o00o-------------------
Stand up,be bold,be strong.
Take the whole responsibility on
ur own shoulders and know that
U are the creator of ur own destiny.
------ooo0-------------------------------------
( ) 0ooo
\ ( ( )
\_) ) /
(_/
On Wed, Jul 1, 2009 at 10:22 PM, * ^ * <[email protected]> wrote:
>
> I have an array of comparable objects. Applying Arrays.sort() on it
> causes a NullPointerException. Relevant code:
> public void remove(int index){
> // objects contain null too. Like: {object, object, null,
> null}
> objects[index]=null;
> // Next statement causes a NullPointerException. I suspect the
> null references causing this.
> Arrays.sort(objects);
> pointer--;
> }
>
> Any idea how I can overcome this? Do let me know if require more codes
> and details. Thank you.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---