I have got a String array and I want to check various subsections of the array whether they contain any and not all of the given characters in the CharSequence
For example
CharSequence obj = "12";
//convert section to string
String s = Arrays.asList(arr[1]).subList(0,2).toString();
if (s.contains(obj))
{
System.out.print("yes");
}
This prints out yes
only when both 1 and 2 are to be found in s
but I want to check whether either 1 or 2 are there?