QUOTE(zoemayne @ 6 Feb, 2008 - 10:20 PM)

i have been searching and searching about java linked list and I cant find information i need on "next"( many sample programs use the word "next"). I don't understand how it is being manipulated- I understand how linked list work ie the pointing etc. in some coding i see something like current = current.next; how could this be correct because next is not a method it does not have the parenthesis....and is not in the api etc. i understand how linked list work i just dont understand what is the deal with current.next......next = null........ if some one can explain this to me please do so lets assume next is equal to int[] next; and Anytype next; I know that "int[] next;" is an arraylist but I can't find any info on using "[]"
for exam: List list=new LinkedList();
Iterator iter=list.iterator();
list.add(4);
list.add(5);
while(iter.hasnext())
System.out.println(iter.next());
it is a next node of any lists and containers(array is exception)
when while begins it'll check if there is next object in that list and returns true if there is,or returns false if there is not. if iter.hasnext() return true after that iter.next() it is first Object of that list and it goes on while there are elements in lists.