So my code is:
String value = "123456"
I want to remove everything except for 2 and 5. the output will be 25 the program should work even the value is changed for example:
String value = "463312"
The output will be 2.
I tried replaceAll() but it doesn't work.