I have these setters and getters in a class called Pokemon but I want to make an array of attack, speed, and defense. How do I get the things used in my getters into this method? I tried to make this array in another class called Pokedex but I get an error saying that these methods cannot be resolved or is not a field. Note: The java files that these classes are located in happen to be in the same package.
public int [] checkStats(String species){
int [] stats = {Pokemon.getDefense, Pokemon.getSpeed, Pokemon.getAttack};
return stats;
}
public int getAttack(){
return attack;
}
public void setAttack(int atk){
attack = atk;
}
public int getDefense(){
return defense;
}
public void setDefense(int def){
defense = def;
}
public int getSpeed(){
return speed;
}
public void setSpeed(int spd){
speed = spd;
}