delete last element of sdtring code example
Example: remove last character from string java
private static String removeLastChar(String str) {
return str.substring(0, str.length() - 1);
}
private static String removeLastChar(String str) {
return str.substring(0, str.length() - 1);
}