I am wondering about why I don\'t get the expected result with this one:
String t = \"1302248663033
Strings are immutable. String operations like replaceAll don't modify the instance you call it with, they return new String instances. The solution is to assign the modified string to your original variable.
replaceAll
t = t.replaceAll("\n", "");