a is a reference to an array. You added that reference to the list twice so, when you print the list's contents, you get the values of that array printed twice.
If you want the list to contain references to two
different arrays you will need to create two different arrays. At the moment you say "int a[e]={1,2,3,4};" which creates one of the arrays. Later you have to say "a=new int[]{5,6,7,8}" to create the other one - or "a=new int[4]" and fill in its elements one at a time.
--- Update ---
Also at
Java Forums.