how to get rid of all but the last three digits in java code example Example: kotlin string remove last 3 digits str.substring(0, str.length() - 2);