string.Compare()方法

判断字符串中是否包含一个值

返回一个值,该值指示指定的 String 对象是否出现在此字符串中。

String a = "abcd";

if(source.a("a"))

{
        System.out.println(是);
 }

else{
               System.out.println(否);
          }

posted @ 2018-12-24 10:07  清风鸣蝉  阅读(1055)  评论(0编辑  收藏  举报