I have a StringBulder strB = "123456"; and when a numerical button is pressed, i want the method to:
- Delete first char from strB (should be "23456")
- Append value from the button on the right side (e.g. "1", so "234561")
- Have the resulting value ("234561") be the strB value
- Have the ability to press one button after the other and it changing the strB (e.g. pressing 2,4,9 now, should result in steB = "561249") And with every one of the button presses the method would do its thing
How can I do that? I've been sitting over this for the past 3 days. Tried String, StringBuilder, StringBuffer, for loops, if, none of them i could make working beyond a first button click, please help :/
CodePudding user response:
