You do not remove it, you overwrite it with spaces...
remove is: cut it off!
replace: replace it!
details2 = details.substring(61, 70);
this gives you 10 chars
details2 = details.substring(details.length-10, details.length);
last 10
if you want 60 spaces and then the last 10, you need to create a String with 60 spaces, and use above method to extract whatever you want
maybe use a StringBuffer for this...
StringBuffer strg = new StringBuffer();
String cut = details.substring(details.length-10, details.length);
IntStream.iterate(0, i -> i++).limit(60).forEach((a) -> strg.append(" "));
strg.append(cut);
System.out.println(strg.toString());