title: How to display a string in linked list using nodes
body: <p>I created a basic node linked list that displays the size of the list in number (ie: 0 - 9 )
  Now I'm trying to alter what i have to display a list of names. I'm confused on what I need to change and what is going to be different. The names are going to be in string format. Eventually I'm going to read in a list of names from a txt file. For now I'm using just 3 names and test data. </p>
  
  <pre><code>       import java.util.*;
  
    public class Node {
  public int dataitems; 
  public Node next; 
  Node front;
  
  public void initList(){
      front = null;
  }
  
  public Node makeNode(int number){
      Node newNode;
      newNode = new Node();
      newNode.dataitems = number;
      newNode.next = null;
      return newNode;
  }
  
  public boolean isListEmpty(Node front){
      boolean balance;
      if (front == null){
          balance = true;
      }
      else {
          balance = false;
      }
      return balance;
  
  }
  
  public Node findTail(Node front) {
      Node current;
      current = front;
      while(current.next != null){
          //System.out.print(current.dataitems);
          current = current.next;
  
      } //System.out.println(current.dataitems);
      return current;
  }
  
  public void addNode(Node front ,int number){
      Node tail;
      if(isListEmpty(front)){
          this.front = makeNode(number);
      } 
      else {
          tail = findTail(front);
          tail.next = makeNode(number);
      }
  }
  
  public void printNodes(int len){
  
      int j;
      for (j = 0; j &lt; len; j++){
          addNode(front, j);
      }  showList(front);
  }
  
  public void showList(Node front){
      Node current;
      current = front;
      while ( current.next != null){
          System.out.print(current.dataitems + " ");
          current = current.next;
      }
      System.out.println(current.dataitems);
  }
  
  
  public static void main(String[] args) {
       String[] names = {"Billy Joe", "Sally Hill", "Mike Tolly"}; // Trying to print theses names..Possibly in alphabetical order
  
      Node x = new Node();
       Scanner in = new Scanner(System.in);
          System.out.println("What size list? Enter Number: ");
      int number = in.nextInt();
       x.printNodes(number);
      } 
  </code></pre>
  
  <p>}</p>