String a = "abc"; String b = "ab"; System.out.println(b.indexOf(a)); 如果输出大于等于0 就包含 负数就不包含
String A=“ab”;String B="a";A.contains(B)