how do i read in files from a ".txt" file into a linked list
heres my code.
import java.io.*;
public class LinkedList1
{
class Node
{
String element; // list element
Node next; // successor link
Node(String el, Node n)
{
element = el;
next = n;
}
Node(String el)
{
element = el;
next = null;
}
}
public static main (String[] args)
{
Node myList = new Node("1");
// AT THIS PART OF MY CODE I WANT TO READ IN INTEGERS FROM A ".txt" FILE
// USING FILE IO HOW DO I DO THAT?
}
}