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 trial

Android Build a Simple Android App (retired 2014) Learning the Language Conditionals: Writing an if Statement

The answer to this question is not correct

"".equals(" ") == false

answer A seems to be " " (has a space) and wouldn't be correct

I was able to drag and highlight with the mouse and there does seem to be a space there.

Ben Jakuben Is this an error in the quiz?

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Thanks for the heads up! I've fixed the quiz. All the double-quotation marks were slightly off...it almost looks like some kind of update or migration happened that slightly changed it. In any event, sorry about the trouble, but it's back to how it's supposed to be now, without any space between the quotes.

3 Answers

I guess the purpose of this question is to make sure if you understand the answer variable does not change. So the correct answer to this would be A.

Though I found this confusing, because whether it has a space does matter and no wonder you care the detail. I'm pretty sure that I did care when I passed this quiz.

I agree with you on the purpose but I think the only way A could be correct is if the space is removed.

I think "None of the above" should be made the correct answer (and leave the space in answer A) because then that would demonstrate that not only do you realize the answer variable doesn't change but that you know the difference between an empty string and a string with a space.

Agree. That would be much better. Whatever it takes, giving beginners this kind of vague quiz is not kind, I guess.

It makes sense that the intended answer is that the value hasn't changed. I would think that the response should change from " " to "". If the correct response were to be "None of the Above" then it turns into a sort of trick question, which may not be good when the goal is to understand the if statement. The question could even be a true/false asking if the value changes, but having the "None of the Above" response could serve to make people think about it a bit more and perhaps get a better grasp on conditionals.

Or maybe I'm just picky. :) Just thought i'd start a discussion, thanks for the replies Jason and Hiroki!

I've been enjoying this website/course so far, looking forward to doing a bit more later this week when I get some time, and to doing some of the other courses eventually.