Java Arraylist With Fixed Size Encoding In Learning