i need to compress an arraylist


Araylist al1= new Arraylist();

al1.add(a1);
al1.add(a2);
al1.add(a3);


can anyone give the code how to comprees the array al1;