Update Serialization.java

Moved declaration of elementsIn array.