我有一个方法的描述,但我不明白如何正确输入。方法的描述
/**
* Add an artist to Karaoke<br>
* Find the end of the artist arrangement and add the new artist to that position.<br>
*/
public void addArtist(String name, String category, String image) {
for (int i = 0; i < artistas.length; i++) {
artistas[i] = new Artista(name, category, image);
}
}
但我不明白如何完成安排的路线。
我很感谢你的帮助。
请勿对非JavaScript代码使用JavaScript代码段。 –
你不能在Java中使用像ArrayList这样的动态结构,它会让你的工作更容易 – zenwraight
保持全局ArrayList array = new ArrayList ();这样的事情,然后你可以很容易做array.push(新Artista()) –
zenwraight