| | |
doubly linked list implementation
![]() |
>how can i do this?
By opening your Java book and figuring out how to do each of the parts of this program. Can you read a name and a message? Can you write a class to hold a message? Can you display text? Get that working with an array first, then you can switch to a more complicated data structure like a linked list.
And by the way, just about every book on programming out there has a decent description of linked lists along with an implementation. Double linked lists are just a simple jump up from single linked lists. The only relatively hard part is making sure that all pointers are updated properly.
So, what exactly are you having trouble with?
By opening your Java book and figuring out how to do each of the parts of this program. Can you read a name and a message? Can you write a class to hold a message? Can you display text? Get that working with an array first, then you can switch to a more complicated data structure like a linked list.
And by the way, just about every book on programming out there has a decent description of linked lists along with an implementation. Double linked lists are just a simple jump up from single linked lists. The only relatively hard part is making sure that all pointers are updated properly.
So, what exactly are you having trouble with?
I'm here to prove you wrong.
•
•
Join Date: Oct 2004
Posts: 2
Reputation:
Solved Threads: 0
yeah, i can read the name and message.. but my program should have a delete option and i don't know how to do it. i can do it with arrays but my project requires me to use doubly linked list not arrays. every post has a message number. and the most recent should be at the top but it doesn't. then i have this textfield that gets the message number to refer to the message to delete. i think this approach is wrong. i have two constructors in my helper class(the main class is a gui), one gets all the strings needed(name,message etc.) and the other gets this object and sets its prev and next links. using this object i can't access the strings.
this is what my code looks like: (wherein o is the object)
item1 = o.element().getame();
i really need help! thanks for replying in advance. more power.
this is what my code looks like: (wherein o is the object)
item1 = o.element().getame();
i really need help! thanks for replying in advance. more power.
![]() |
Similar Threads
- doubly linked list--- help needed1 (C++)
- linked list implementation of stacks (C)
- To create contact manager using doubly linked list(c++) (C++)
- "doubly linked list" question (C)
- How Can I Sort a Doubly Linked List Queue? (C)
- Code Snippet: Doubly Linked List Implementation (C)
- Need Help to Print Doubly Linked List(DLL) (Java)
Other Threads in the Java Forum
- Previous Thread: help with polymorphism and inheritance...getting null values
- Next Thread: Countdown
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array arrays automation bi binary blackberry block bluetooth character class client code compile compiler component consumer database desktop developmenthelp eclipse error fractal freeze ftp functiontesting game gameprogramming givemetehcodez graphics gui health html ide image integer j2me j2seprojects java javac javaee javaprojects jetbrains jni jpanel jtable julia learningresources lego linked linux list mac main map method methods mobile myregfun netbeans notdisplaying number online printf problem program project qt recursion researchinmotion rotatetext rsa scanner screen server set singleton sms sort spamblocker sql string swing system textfields threads time title tree tutorial-sample update variablebinding windows working xor






