title: How do I create a queue after reading my file?
body: <pre><code>FileReader r = new FileReader(stackfile);
  BufferedReader reader = new BufferedReader(r);
  String s, line = null;
  int counter = 1;
  while((s = reader.readLine()) !=null) {
      counter++;
      System.out.println(counter + &quot;.&quot; + s);
  }
  
  queue.createQueue();
          
  System.out.println(&quot;Queue is empty with&quot; + queue.isEmpty());
  queue.enqueue(s);
  System.out.println(&quot;This is the queue&quot;);
  queue.displayQueue();
      
  System.out.println(&quot;\n\nDequeuing now&quot;);
  String newString = (String)queue.dequeue();
      
  System.out.println(&quot;New String is: &quot; + newString);
  String[] lineComponents = newString.split(&quot;,&quot;);
  for(int i = 0; i &lt; lineComponents.length; i++) {
      System.out.println(&quot;Line components is [ &quot; + i + &quot;]: &quot; + lineComponents );
      String[] binaryNumbers = lineComponents[i].split(&quot;;&quot;);
      for(int j = 0; j &lt; binaryNumbers.length; j++) {
          System.out.println(&quot;Binary Numbers[&quot; + j + &quot;]:&quot; + binaryNumbers[j]);
          for(int k = 0; k &lt; binaryNumbers[j].length(); k++) {
              char c = binaryNumbers[j].charAt(k);
              System.out.print(&quot;Single Binary numbers [&quot; + k + &quot;]: &quot; + c);
          }
      }
  }
  </code></pre>