It;s the initial capacity of the ArrayList:
ArrayList (Java Platform SE 7 )[
^] - if it isn't specified then it starts with a capacity of 10. When you specify it as 2 it allocates just two elements to start with.
It's for efficiency - if you know how many elements you are going to use, then you can start with that as the capacity and save the constant reallocation until you reach it.
See here:
List<T> - Is it really as efficient as you probably think?[
^] - it's C# based but the Java ArrrayList does exactly the same thing, for the same reasons.