String str = "1234567";
if(str.indexOf("23") != -1)
{
     System.out.println("包含该字符串");
}

posted on 2012-11-20 18:00  纯洁的坏蛋  阅读(293)  评论(0编辑  收藏  举报