小编Rya*_*yon的帖子

找不到符号 - 类Iterator [Java]

我刚刚开始使用Java并收到错误:"找不到符号 - 类Iterator"

我的代码出了什么问题?

public class Notebook
{
    // Storage for an arbitrary number of notes.
    private ArrayList<String> notes;

    /**
     * Perform any initialization that is required for the
     * notebook.
     */
    public Notebook()
    {
        notes = new ArrayList<String>();
    }

    /**
     * Store a new note into the notebook.
     * @param note The note to be stored.
     */
    public void storeNote(String note)
    {
        notes.add(note);
    }

    /**
     * @return The number of notes currently in the notebook.
     */
    public int numberOfNotes() …
Run Code Online (Sandbox Code Playgroud)

java

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

java ×1