import java.util.ArrayList;
import java.util.Arrays;
public class Dragon {
private String[] interests = new String[4];
public Dragon(String[] interes) {
setInterests(interes);
}
public void setInterests(String[] interes) {
interests = interes;
}
public String[] getInterests() {
return interests;
}
@Override
public String toString() {
return "Dragon [interests=" + Arrays.toString(interests)"]";
}
}
Main class DragonMain
public class DragonMain {
public static void main(String[] args) {
Dragon test = new Dragon(args);
test.setInterests(interes);
}
}
I am not sure where I am meant to enter the data for the array as I keep getting errors.
Error:
interes cannot be resolved to a variable.