1public class Challenge {
2 public static String reverse(String str) {
3 char[] c = str.toCharArray();
4 int i = 0, j = c.length-1;
5 while(i< j){
6 while(Character.isDigit(c[i]))
7 i++;
8 while(Character.isDigit(c[j]))
9 j--;
10 char t = c[i];
11 c[i] = c[j];
12 c[j] = t;
13 i++;
14 j--;
15
16 }
17 return new String(c);
18
19
20 }
21}