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
Franklin Mark Aguba
4,082 Points[Done] Stuck on String Equality part two
Hi! I'm currently stuck on part two of the said exercise. My code seems to be correct and yet the compiler doesn't recognize my solution. Any thoughts?
Here's my code,
// I have imported a java.io.Console for you, it is named console.
String firstExample = "hello";
String secondExample = "hello";
String thirdExample = "HELLO";
if(firstExample.equalsIgnoreCase(thirdExample)) {
console.printf("first and third are the same ignoring case");
}
Here's a link to the screenshot. I can't seem to use the image markup here at Treehouse: http://imgur.com/lTgrnmX
Error message: Bummer! Make sure you are using equalsIgnoreCase on the firstExample variable and use console.printf
4 Answers
Paul LeDuc
7,844 PointsHi Franklin, What is the specific message that the compiler is generating? It is helpful to track down the issue and provide an answer.
Franklin Mark Aguba
4,082 PointsHi! Thanks for helping out. Sorry about that!
Here's the error message. I'll edit the initial post to for others to see. :)
[Error Code](Downloads\error.png "Bummer error")
EDIT: Error message: Bummer! Make sure you are using equalsIgnoreCase on the firstExample variable and use console.printf
Franklin Mark Aguba
4,082 PointsFacepalm. I now just realize that you should still keep the first answer from the equation so you can get the correct answer.
We make mistakes. We make mistakes.
Paul LeDuc
7,844 PointsHey, the main thing is you figured it out :) We learn from our mistakes. Have a great day.
Vince Shemida
Courses Plus Student 195 PointsSo what is the answer? I'm still confuse here. Please help.
Vince Shemida
Courses Plus Student 195 PointsNevermind, too late. I figured it out.