java_函数手册_String_1.8_contains_判断是否包含指定字符串

 1 package calssString;
 2 
 3 public class contains___1_8 {
 4     public static void main(String[] args) {
 5         String strCom = "I LIKE JAVA";
 6         boolean str = strCom.contains("JAVA");
 7         System.out.println(str);
 8 
 9         strCom = "I LIKE JAVA";
10         str = strCom.contains("J  AVA");
11         System.out.println(str);
12 
13     }
14 }

 

posted @ 2018-03-28 19:34  alm  阅读(1244)  评论(0编辑  收藏  举报