plz help me in writing the logic with out using the util packege classes in java? plz give the code for this program in linkedlists way (not by using util package classees)

import java.util.*;
public class arr1
public static void main(string args[])
list l1=new ArrayList(); // or list l1=new linkedlist();
Iterate i1=l1.iterate();

A linked list is nothing by collection of nodes which contain data and a pointer to the next node.

[data | ref] -> [data | ref] -> ....

Create a class called as Node which would have an Object reference to hold reference to objects and a Node reference to hold a pointer to the next node in the linked list.

The linked list class would contain a member variable 'head' of type Node which would point to the head of the list.

As for the rest, you should read up on something related to Linked Lists. Read this and this.