updated code for ArraysTest.java