判断字符串首尾内容startsWith()方法和 endsWith()方法分别用于判断字符串是否以指定的内容开始或结束,返回值都是 boolean类型。1. startsWith(String prefix)