954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Saving nodes in singly linked list to text file

Is it possible to write a method and declare something like

Node currentNode;


to "scan" through each nodes in the list, and saving to file. I guess I can use

import java.io.*;


to declare the necessary file stream variables.

Would really appreciate some ideas and tips on how to approach this problem.

hauda67
Newbie Poster
15 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

What do you mean by "saving nodes"... do you want to save the nodes as in the internal representation of the list, or do you want some sort of text representation of each node?

That is, is this output for presentation, or is it saving the data to load into memory again?

jon.kiparsky
Posting Virtuoso
1,849 posts since Jun 2010
Reputation Points: 383
Solved Threads: 187
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: