且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java - 删除字符串的第一个字符

更新时间:2021-09-15 15:58:02

使用 substring() 函数,参数为 1 ,以获取从位置1(第一个字符之后)到字符串末尾的子字符串(保留第二个参数默认为字符串的全长。)

Use the substring() function with an argument of 1 to get the substring from position 1 (after the first character) to the end of the string (leaving the second argument out defaults to the full length of the string).

"Jamaica".substring(1);