Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-05-2007, 06:10 PM
Member
 
Join Date: Jul 2007
Posts: 40
trill is on a distinguished road
Help with linked list
Hi, I have a file that has a database of customers in it. Each customer has 5 attributes and i need to read them into an object and put them into a linked list. I cant seem to find a good example of a linked list code anywhere. Could someone please give me some code that will get me moving.
Thanks.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 09:29 AM
zoe zoe is offline
Member
 
Join Date: Jul 2007
Posts: 40
zoe is on a distinguished road
Your question is too easy...all what you need is to create a new class and put in it 4 variables that you wanna add to the linked list...
then, make a constructor to initialize them to the proper values..
and from the test class:
Code:
YourObjectName ob = new YourObjectName(var1, var2, var3, var4)
as you arranged them in your class constructor...
them simply use your linked list reference to add your object..
for example:
Code:
list.append(ob); list.preppend(ob);
and so on...
sorry I can't post any code here
hope I could up help you enough,
good luck
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Circular Double Linked List theonly Advanced Java 1 04-04-2008 09:18 AM
Linked List help neobie New To Java 8 12-22-2007 05:15 AM
linked list nodes all refernce same item. yllawwally New To Java 0 12-18-2007 10:45 PM
going from vectors to linked list? cbrown08 New To Java 3 12-01-2007 02:55 AM
Linked List rnavarro9 New To Java 0 11-29-2007 05:42 AM


All times are GMT +3. The time now is 10:51 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org