1
interface Creature {
void display();
void damage(int x);
}
class Beaver implements Creature {
....
}
class World {
Creature[] creatures = new Creature[0];
...
void spawnCreature(Creature c) {
creatures = append(c, creatures);
}
}
에 객체를 추가하지만 난 오류 얻는 방법 : []인터페이스 배열 처리
Plz은 이와 같은
이 오류가 발생하는 줄과 추가 기능 코드를 공유하십시오. –
행은 append() 및 append()가 내장 된 행이었습니다. – Nikos