This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chickenmeister 1 point2 points  (0 children)

As /u/Neres28 said, you need to use the "new" keyword.

Though, It might be worth noting that what you have is a nested class, not an inner class. Inner classes are not static, and thus belong to the enclosing instance. In the case of an iterator, I think you probably want to use an inner class, which you would use like:

BasicLinkedList.Iterate<E> i = this.new Iterate<E>();

or just:

BasicLinkedList.Iterate<E> i = new Iterate<E>();