you cannot compare String object with "=="
for String comparison
use
"a".equals(first)