删除字符串最后一个字符

@Test
public void test(){
String s="CCY|CCY|";
System.out.println(s.substring(0, s.length()-1));
}

原文地址:https://www.cnblogs.com/shoubianxingchen/p/4235231.html