×

Loading...

How about

class ListNode {
Container data;
ListNode next;
....
}

public class List implements Enumeration {
private ListNode firstNode;
private ListNode lastNode;

public List(){
firstNode=lastNode=null;
}

public List(ListNode ){...}

public boolean hasMoreElements(){...}

public ListNode nextElement(){...}

....
}
Report

Replies, comments and Discussions: