previous | start | next

Implementing Linked Lists

class LinkedList
{  
   public LinkedList()
   {  
      first = null;
   }
      public Object getFirst()
   {  
      if (first == null) 
         throw new NoSuchElementException();
      return first.data;
   }
   . . .
   private Link first;
}


previous | start | next