Linux find, multiple directories, and exec grep

Yesterday I needed to find all the files in two subdirectories (/tmp and /home) on a Linux platform ending with the characters ".java", that contained the string "commit". Here's the little ditty that made that happen:

find /tmp /home -type f -name "*.java" -exec grep 'commit' {} \; -print

For finding files and directories on Unix systems (or Cygwin) the find command rules.