add DynamicArray java file