you can use the following code :
char[] chars = // your initialization string s = String.valueOf(chars); if(s.contains("your substring")){ // do domething } else{ // do domething }