I wrote some code to erase the last character of a String, and put that code inside a method called onAction . There, I use a switch statement to handle many cl
onAction