ArrayList
Tuesday, 21 June 2011
import java.util.*;
public class ArrayListDemo {
public static void main(String[] args) {
ArrayList a=new ArrayList();
System.out.println(a.size());
a.add("khaleel");
a.add("baskar");
a.add("murali");
a.add("khaleel");
a.add(null);
a.add(new Integer(20));
a.add(new String("hero"));
ArrayList b=(ArrayList)a.clone();
System.out.println(a);
System.out.println(b);
System.out.println(a.size());
}
}
public class ArrayListDemo {
public static void main(String[] args) {
ArrayList a=new ArrayList();
System.out.println(a.size());
a.add("khaleel");
a.add("baskar");
a.add("murali");
a.add("khaleel");
a.add(null);
a.add(new Integer(20));
a.add(new String("hero"));
ArrayList b=(ArrayList)a.clone();
System.out.println(a);
System.out.println(b);
System.out.println(a.size());
}
}
0 comments:
Post a Comment