Connecting...

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to Java
For more information, please see full course syllabus of Introduction to Java
Introduction to Java Strings
Lecture Description
In this lesson, our instructor Tom Quayle goes through an introduction on strings. He starts by discussing literal strings, string concatenation, string length and string comparison. He then moves on to discuss taking a subset of a string and searching wi
Bookmark & Share
Embed
Share this knowledge with your friends!
Copy & Paste this embed code into your website’s HTML
Please ensure that your website editor is in text mode when you paste the code.(In Wordpress, the mode button is on the top right corner.)
×
Since this lesson is not free, only the preview will appear on your website.
- - Allow users to view the embedded video in full-size.
Next Lecture
Previous Lecture
1 answer
Sun May 18, 2014 10:38 PM
Post by Thuy Nguyen on May 5, 2014
Is there also a .compareTo - Ignore case?
2 answers
Last reply by: M C
Fri Jul 5, 2013 7:22 PM
Post by M C on July 4, 2013
Re: Scenario 1: Use of == operator on 2 Strings objects that were initialized at "development time":
Per your explanation about use of == operator on 2 String objects that were initialized at "run time" (Scenario 2), "the == operator tells you whether the 2 String objects share the same memory location."
Based on this explanation, it seems you are saying that the reason the == operator returned "true" for Scenario 1 is that the s1 and s2 String objects "share the same memory location." Is that what you meant? If so, I do not understand why Java does this. Please provide some explanation.
You really left the "true" outcome of the Scenario 1 == operator hanging, after executing Scenario 2 and then explaining the effect of the == operator.
1 answer
Last reply by: Arshin Jain
Sat May 4, 2013 9:02 PM
Post by John Dixon on May 13, 2012
Video is wonderful and very helpful. I wish though the entire code was available for testing on my end so I could run it at the same time he does. It is helpful to see this as I try to make sense of it all. Thanks plenty.