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
-~----------~----~----~----~------~----~------~--~---

Reply via email to