Update ArrayType.java

fix some problems when executing code sample shown in the documentation. Another fix is to change Float with Double.