I'm trying to write a program that creates random spell effects, but 'length' cannot be resolved to a variable...
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 < length; i++) {
int rand = (int) (Math.random() * length);
System.out.print(objects[rand]);
System.out.print(" ");
}
}
}