-If your head node isn't a dummy node, remember to check and make sure your new node isn't supposed to be the new head.
-Please consider renaming "word" to something like "newNode" because "word" sounds like a
String, not a ListNode.
Try making your logic plainer by creating a couple booleans named such that it is clear what you are
testing.
You might re-name your ListNodes x and y something like currentNode and nextNode, then drawn a picture of what happens as the method executes.
What you want to do is
[ March 12, 2004: Message edited by: Elouise Kivineva ]