try this
first you have to create an int

int x = -1;

if(!isCharacterPresent(input.charAt(i), noRepeatCharacters, x))

last++;
noRepeatCharacters[x] = input.charAt(i);