Java String endsWith(str)方法 判断是否以给定的str结尾
public class Main{ public static void main(String[] args) { String str1 = "Hello world!"; String str2 = "IncludeHelp"; System.out.println(str1.endsWith("world!")); //true System.out