Driver program to check above functions
public static void main ( String [ ] args ) { String str1 = " ad " ; stringFilter ( str1 . toCharArray ( ) ) ; String str2 = " acbac " ; stringFilter ( str2 . toCharArray ( ) ) ; String str3 = " aaac " ; stringFilter ( str3 . toCharArray ( ) ) ; String str4 = " react " ; stringFilter ( str4 . toCharArray ( ) ) ; String str5 = " aa " ; stringFilter ( str5 . toCharArray ( ) ) ; String str6 = " ababaac " ; stringFilter ( str6 . toCharArray ( ) ) ; } }