Results 1 to 2 of 2

Thread: Linked lists

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2005
    Posts
    27

    Linked lists

    hi,i am wondering if anyone have sample of Linked lists program. if you do, could you please upload it in the code bank Java fourm?

  2. #2
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: Linked lists

    Almost exactly like the arraylist.

    Code:
    LinkedList ll = new LinkedList();
    ll.add(a);
    ll.add(b);
    ll.add(c);
    
    Interator i = ll.getIterator();
    
    while (i.hasNext())
    {
          print out i.getNext();
    }

Posting Permissions

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



Click Here to Expand Forum to Full Width