Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Finding the Position of the First Match - Intro to Java Programming

Get Embed Code
5 Languages

Showing Revision 5 created 05/25/2016 by Udacity Robot.

  1. You saw how to find the first match and also return if there are no matches.
  2. But what if you want to find out where the first match occurs? In our Alice in
  3. Wonderland example, maybe we find the first long word and then find out how far
  4. in that occurs to get some idea of how common long words really are. This is
  5. where the program left off. How would you modify it to return the position of
  6. the first long word? As well as that the long word was. Remember, the position
  7. of the first word would be zero, and the position of the second word would be
  8. one.