int j = Character.getNumericValue(str.charAt(0)); //char to int
int j = Integer.parseInt(str); // String to int int j = Integer.valueOf(str); str2=str2+""+str1.charAt(0); // save the last String with new added symbols, without str2 it will reboot new value ONLY