private boolean isNotSymbol(String text,int index,char c){
  if (index >= 0 && index < text.length()) {
    return text.charAt(index) != c;
  }
  return true;
}

private boolean isNotSymbol ( String text , int index , char c ) { if ( index >= 0 && index < text . length ( ) ) { return text . charAt ( index ) != c ; } return true ; }
checking if symbol is not eq to c
