delete last element of string java 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);
}