title: Cannot find symbol- method getNext()?
body: <p>I am running BlueJ as my IDE. For some odd reason I get an error in this line of code:</p>
  
  <pre><code>import javax.swing.*;
  
  public class RotateArrayCircularLL
  {
      private Node head=null;   
  
      // ==================================================================================
      public void init()
      {
  
         int choice = 0;
  
          while (choice != -1){
          choice = Integer.parseInt(JOptionPane.showInputDialog("Enter -1 to stop loop, 1 to continue"));    
  
          if(choice == -1)
              break;
  
          inputNum();
  
        }
        printList();
      }
  
      public void inputNum()   
      {
          Node n;
          Node temp;
          int k;
  
          k = Integer.parseInt(JOptionPane.showInputDialog(null,"Enter a number:"));
          n = new Node(k);       
  
           if (head == null) {
              head = n;            
           } else {            
              temp = head;
              while (temp.getNext() != null)
                  temp = temp.getNext();
  
              temp.setNext(n);                
          }       
  
      } 
  
  
      public void printList()  
      {
          Node temp = head;
          Node d, e;
  
          int count =  Integer.parseInt(JOptionPane.showInputDialog("Enter the value to shift to the right"));
  
          for (int i = 1; i &lt;= count; i++) // Rotates the head
              temp = temp.getNext();
  
          for (e = head; e != null; e = e.getNext()){
             if (e.getNext() != null)
              System.out.print(e.getInfo() + "-");
             if (e.getNext() == null)
              System.out.print(e.getInfo()); 
          }
  
          for (Node c = temp; c != null &amp;&amp; c.getNext() != head; c= c.getNext()){ 
                  System.out.print(c.getInfo() + "-");
          }
          for (d = head; d != null &amp;&amp; d.getNext() != temp; d = d.getNext())
          {
              System.out.print(d.getInfo()+ "-");
          }
          System.out.println(d.getInfo());
      } 
  
  
  }
  </code></pre>
  
  <p>The error is: Cannot find symbol- method getNext(). </p>
  
  <p>The code was working perfectly before but recently my compiler froze and was not responding so I ended the process via Task Manager. Since then it started to act up.</p>
  
  <p>Can anyone explain why it is not working? I don't think that it is my issue, but rather the compilers. </p>