public class test {
    public static void main(String[] args){
        System.out.println("abcde".contains("bcd"));
    }    
}

输出:true

 

解释:string.contains()用于判断字符串string分是否包含子字符串“xxx”;

相关文章:

  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
猜你喜欢
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-12-09
相关资源
相似解决方案