I have a generic linked list with an iterator(code below).
public static void main(String[] args) { LinkedListStuff<String> myStuff = new LinkedListStuff<String>(); LinkedListStuff.listIterator myIterator = myStuff.iterator(); myList.addToStart("sports"); myList.addToStart("books"); myList.addToStart("hobbies"); ...
For some reason, I keep getting a "can't find symbol" error.
Could someone point me in the right direction?
Here's the error:
LinkedListStuff3Demo.java:9: cannot find symbol
symbol : method iterator()
location: class LinkedListStuff<java.lang.String>
LinkedListStuff.listIterator myIterator = myStuff.iterator();
Thanks!