Results 1 to 3 of 3
  1. #1
    pramod_r20 is offline Member
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Angry Need Help in Removing Objects from list

    Hi All,I am new to coding and i am facing difficulty in solving the following issue..


    I have a list which has 10 objects (3 objects with id 1,3 objects with id 2,4 object with id3)I need to remove/copy all the objects of a particular id to new Arraylist (in my case i need 3 lists with each list having objects of a particular id) .Can any one help me out with this one.Thanks in advance.....
    Last edited by pramod_r20; 12-10-2010 at 11:19 AM. Reason: missed some details

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default

    Lets see what you've tried first. Do you know how to write a loop that iterates over the list? Do you know how to use an Iterator?

    db

  3. #3
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    449
    Rep Power
    6

    Default

    You could use enhanced for loop or iterator interface.
    Mak
    (Living @ Virtual World)

Similar Threads

  1. Replies: 1
    Last Post: 05-04-2010, 11:00 AM
  2. need help with removing repetitions from linked list...
    By OptimusPrime in forum New To Java
    Replies: 8
    Last Post: 03-09-2010, 08:29 PM
  3. List of objects
    By rekha in forum New To Java
    Replies: 6
    Last Post: 03-20-2009, 11:39 AM
  4. Getting objects from a list
    By markyoung1984 in forum New To Java
    Replies: 4
    Last Post: 03-13-2008, 10:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •