e.g. String Str1 =”A1 B2 C3″
I want to swap the C3 with the B2 character
output should be String Str2= “A1 3C 2B”
I attached the image of which program, I tried but here I can replace B with C not the no
Check and give me a suggestion on how Can I swap C3 with B2
New contributor
Swati Mahadak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4