for(int i=0; i<userInput.length(); i++){
chemicalCh = userInput.charAt(i);

if(Character.isLowerCase(chemicalCh)){
splittedUserInput+=chemicalCh;
String result = (String) chemicalElement.get(splittedUserInput);
System.out.println(splittedUserInput+ " for " +result);
}
else(!splittedUserInput.equals("")){ chemicalArray.add(splittedUserInput.trim());
splittedUserInput = userInput.substring(i,i+1);
}
}

I use this arguement to make my program figure out how to reconize : XeCa
Xe - Xenon
Ca - Calcium

but it doesn't reconize Single character anymore
so if it is XeCaS

It reconize Xe and Ca but not S?

(I store all the character in Hastable, Xe as primary key and Xenon as secondary key)
Can anyone help?