Namely, you're putting number characters into a stack of Integers (casting a char to an int in the process). And when you pop a value off of your stack of integers, you get an integer value, which gets printed.

Whereas you're putting letter characters into a stack of Characters. (performing no cast). When you pop a value off of your stack of characters, you get a character, and that's what gets printed.