public static String gerundForm(final String word){
  if (word.length() > 2) {
    char last=word.charAt(word.length() - 1);
    if (last == 'y' || last == 'w') {
      return word + "ing";
    }
 else     if (isVowel(last)) {
      return word.substring(0,word.length() - 1) + "ing";
    }
 else     if (isVowel(word.charAt(word.length() - 2))) {
      return word + word.charAt(word.length() - 1) + "ing";
    }
  }
  return word + "ing";
}

public static String gerundForm ( final String word ) { if ( word . length ( ) > 2 ) { char last = word . charAt ( word . length ( ) - 1 ) ; if ( last == 'y' || last == 'w' ) { return word + "ing" ; } else if ( isVowel ( last ) ) { return word . substring ( 0 , word . length ( ) - 1 ) + "ing" ; } else if ( isVowel ( word . charAt ( word . length ( ) - 2 ) ) ) { return word + word . charAt ( word . length ( ) - 1 ) + "ing" ; } } return word + "ing" ; }
return gerund form , e . g . " making " or " casting " .
