1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LinkedList<T> Java

  1. May 19, 2008 #1
    Could someone check the following 3 classes for me please?

    public class LinkedList<T>
    public Node<T> first;
    public Node<T> last;
    protected class Node<T>
    public Node<T> next;
    public Node<T> last;

    public class Iterator<T>
    protected Node<T> current;
    protected Node<T> previous;


    I've only included the classes and variables in order to illustrate the visibility.
    when I complile I'm getting the msg that "Node<T> current" isn't available in LinkedList<T> class...why not !?Am I only allowed one inner class?Also i ensured that my iterator was constructed within the LinkedList constructor so i dont think that it could be a problem with instantiating the iterator object.
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted

Similar Discussions: LinkedList<T> Java
  1. [Java] PNGException (Replies: 2)

  2. JAVA GridLayout (Replies: 1)

  3. Java interpreter (Replies: 8)

  4. Java Cylinders (Replies: 2)