Java classes, constructors, arrays and matrices