title: Cannot be resolved to a variable?
body: <p>I'm trying to write a program that creates random spell effects, but 'length' cannot be resolved to a variable...</p>
  
  <pre><code>package Chaos;
  
  import java.util.Random;
  
  public class Effects {
      public static void main(String[] args) {
  
          String[] objects = { "Effect1", "Effect2", "Effect3", "Effect4" };
  
          int effect = objects.length;
  
          for (int i = 0; 1 &lt; length; i++) {
              int rand = (int) (Math.random() * length);
              System.out.print(objects[rand]);
              System.out.print(" ");
          }
      }
  }
  </code></pre>