I want increase the numbers in a string.
For example; I want to modify
"HTML[0].BODY[0]/UL[1]/LI[10]/A[1]"
to
"HTML[1].BODY[1]/UL[2]/LI[11]/A[2]"
Note: I accept the answer, but I want to add my tryings;
replace("8", "9").replace("7", "8").replace("6", "7").replace("5", "6").replace("4", "5").replace("3", "4").replace("2", "3").replace("1", "2").replace("0", "1")
and I realize that 9 could not change so I tried
for(int i=0;i<s.length();i++){
if (Character.isDigit(s.charAt(i)))
{
int a=Integer.parseInt(s, s.charAt(i))+1;
s.charAt(i)=(char)a;
System.out.println(s.charAt(i));
}
}
This did not work also.. second note: Generally, I tried to write all codes, and due to points I get an warning. And I did not want to write part of codes