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

 

相关文章: