khaleel. Powered by Blogger.

LinkedList

Tuesday 21 June 2011

import java.util.*;
public class LinkedListDemo {

   
    public static void main(String[] args) {
        LinkedList l=new LinkedList();
        System.out.println("=============");
        System.out.println(l.size());
        l.add("khaleel");
        l.add("khaleel");
        l.add("bhaskar");
        l.add("murali");
        l.add("murali");
        l.add(null);
        l.add(null);
        l.add(new Integer(10));
        System.out.println(l);
        l.set(1, "killer");
        System.out.println(l);
        l.addLast("centris");
        System.out.println(l);
        l.addFirst("hero");
        //l.removeFirst();
        System.out.println(l);
        System.out.println(l.size());
    }

}

Post a Comment

Related Posts Plugin for WordPress, Blogger...
Promote Your Blog

About This Blog

This blog is for java lovers

Total Pageviews

About Me

khaleel-bapatla
BAPATLA, ap, India
simple and honest
View my complete profile

  © Blogger template On The Road by Ourblogtemplates.com 2009

Back to TOP