Change Variable type to another type

I have defined a variable as some type (for example, String variable Fee amount = 25000) , and if I want to switch the type to another (String to a number variable of 25000), I can’t do it currently. I have to delete the first defined variable first and then create another variable with the desired variable type.