Use (i) instead of charAt(i).