Java Scrap Book  

Java Scrap Book > Java Collection > Overview of ArrayList

Overview of ArrayList

  • The ArrayList class extends AbstractList and implements the List interface.
  • The ArrayList class is the Collection Framework's replacement for the Vector class.
  • ArrayList is not synchronized by default,But Vector is synchronized.
  • add() member function used to add single element in ArrayList

package com.javascrapbook;
import java.util.ArrayList;;
import  java.util.List;
public class  ArrayListDemo {
   public static void main(String[] a) {
     List<Boolean>  list = new ArrayList<Boolean>();
}  © Copyright 2013 is a computer science content service should not be treated as the publisher or speaker of any information provided by another Computer Science content provider.

Contact email: