String s = String.valueOf(456239875); s=s.replace('4','x'); s=s.replace('9','4'); s=s.replace('x','9'); int result = Integer.parseInt(s); System.out.println(result);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)