Comparing the current word with the word to be searched
if ( temp . compareTo ( word ) == 0 ) { return true ; } } return false ; } static String transform ( String word ) { return word . toUpperCase ( ) ; }