Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJeremy Settlemyer
4,149 PointsConverting name to string
So you asked how we would solve the problem of converting the editable text into a string during the video.
So here is my question. Is there a difference in using the the following code:
String name = mFieldName.getText().toString();
compared to doing
String name = mFieldName.getText() + "";
1 Answer
Afik Paryente
2,042 PointsShort answer NO. Long answer YES. Practicle answer? The result is the same.
Jeremy Settlemyer
4,149 PointsJeremy Settlemyer
4,149 PointsYou have to love programming where there is always multiple ways of doing things.