Results 1 to 4 of 4
  1. #1
    swp
    swp is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Doubly-Linked list

    I undesrstand what a doubly-linked list is and i have a class written for just a regular double linked list but how do declare a doubly-linked list like this?

    Public class doublyLinkedSeq{
    private int seq1;
    private doublyLinkedSeq backlink;
    private doublyLinkedSeq forelink;

    }

    if so^^
    then where do i place this?

    thanks!!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Doubly-Linked list

    I don't understand your question. You'd declare it wherever you need it and would declare it just like any other variable. Where are you stuck?

  3. #3
    swp
    swp is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Re: Doubly-Linked list

    Well actually i kinda figured it out. I have a Class DoubleNode, and a class DoublyLinkedSeq that uses double node (which at this point are both just four a regular double linked list) and im trying to change them so the linked list becomes a doubly-linked list. Would i need to declare them in the double node class or the doublyLinkedSeq class, probably the double node class?

  4. #4
    Join Date
    Feb 2011
    Location
    Ahmedabad
    Posts
    36
    Rep Power
    0

Similar Threads

  1. help me on this: circular doubly linked list
    By someone in forum New To Java
    Replies: 13
    Last Post: 04-11-2011, 11:57 AM
  2. Doubly linked list, reverse()
    By hamed in forum New To Java
    Replies: 4
    Last Post: 10-29-2010, 10:53 AM
  3. Doubly Linked List
    By matin1234 in forum New To Java
    Replies: 0
    Last Post: 06-02-2010, 06:58 AM
  4. doubly linked list insert
    By ineedhelpwithjava in forum Advanced Java
    Replies: 1
    Last Post: 03-20-2009, 03:05 PM
  5. Help with Doubly linked list
    By Dr Gonzo in forum New To Java
    Replies: 5
    Last Post: 12-06-2008, 08:45 AM

Posting Permissions

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