English subtitles

← Comparing Strings - Intro to Java Programming

Get Embed Code
6 Languages

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

  1. Perhaps surprisingly, you're going to run into a very similar issue when you
  2. compare strings. Check out this code. I have two strings, Uda and city. I
  3. concatenated the two together, to form a string that are called firstAndSecond.
  4. And over here I have a third string, Udacity. And now I check wether, the first
  5. and second which we would expect to be Udacity, is the same as, Udacity. And if
  6. so this program prints, they are the same, otherwise it prints what
  7. firstAndSecond is. Again, go ahead and run this program yourself and tell me
  8. what you find. Just put your output into this box.