How does one declare an array of classes in Java and then use methods of the class when calling upon the array?