title: cannot find symbol error for linkedlist
body: <pre><code>import java.util.*;
  
  class BallList{
      private LinkedList&lt;Integer&gt; list = new LinkedList&lt;Integer&gt;();
  
      public BallList(int n){
          for (int i = 0; i &lt; n; i++){
              list.add(i+1);
          }
      }
  
      public void DoAxy(int num1, int num2){
          Iterator iterator = list.iterator();
          int count = 0;
          while (iterator.hasNext()){
              count++;
              if (iterator.next().equals(num1)){
                  break;
              }
          }
          int index = count;
          list.remove(num2);
          list.add(index,num2);
      }
  
      public void DoBxy(int num1, int num2){
          Iterator iterator = list.iterator();
          int count = 0;
          while (iterator.hasNext()){
              count++;
              if (iterator.next().equals(num1)){
                  break;
              }
          }
  
          int index = count-1 ;
          list.remove(num2);
          list.add(index,num2);
      }
  
      public void DoRemove(int num){
          list.remove(num);
      }
  
      public LinkedList &lt;Integer&gt; getList(){
          return list;
      }
  }
  
  class Balls2{
      public static void main(String[] args){
          int num_balls, num_ops;
          String op;
  
          Scanner sc = new Scanner(System.in);
  
          num_balls = sc.nextInt();
          num_ops = sc.nextInt();
  
          BallList Arrayballs = new BallList(num_balls);
  
          for (int i = 0; i &lt; num_ops; i++){
              op = sc.next();
              if (op.equals("A")){
                  int ball_1 = sc.nextInt();
                  int ball_2 = sc.nextInt();
                  Arrayballs.DoAxy(ball_1, ball_2);
              }
              else if (op.equals("B")){
                  int ball_1 = sc.nextInt();
                  int ball_2 = sc.nextInt();
                  Arrayballs.DoBxy(ball_1, ball_2);
              }
              else{
                  int ball = sc.nextInt();
                  Arrayballs.DoRemove(ball);
              }
          }
      }
      LinkedList&lt;Integer&gt; listballs = Arrayballs.getList();
  
  
  }
  </code></pre>
  
  <p>When I run the above code, I get the error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Balls2.java:80: error: cannot find symbol
      LinkedList&lt;Integer&gt; listballs = Arrayballs.getList();       
                                      ^
    symbol:   variable Arrayballs
    location: class Balls2
  1 error
  </code></pre>
  
  <p>Can anyone help me on this?</p>