Below is the declaration for the java.lang.String.contains() method
public boolean contains(CharSequence s)
So you must convert the character to a string before passing it to a function
Character ch = 'c'; str.contains(ch.toString());
or
str.contains(ch+"");
Correct code
str1=rs.getString(1); int len=str1.length(); while(i<len) { char ch=str1.charAt(i); if (str.contains(ch+""))
source share