java retirer derniere caractere sting

Solutions on MaxInterview for java retirer derniere caractere sting by the best coders in the world

showing results for - "java retirer derniere caractere sting"
Mollie
01 Mar 2018
1public static String removeLastChar(String s) {
2    return (s == null || s.length() == 0)
3      ? null
4      : (s.substring(0, s.length() - 1));
5}