Please watch the code style guidelines:

for (int i = 1; i <= numberOfKeys; i++) { }

(spaces around the operators). Same in the expression below.