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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ted Clayton](https://secure.gravatar.com/avatar/75fd3a7afc43bca47a48e2aac12ae3a5?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ted Clayton
Courses Plus Student 206 PointsChallenge #2 won't run
if (firstExample.equalsIgnoreCase(thirdExample)) { console.prinf("first and third are the same ignoring case. \n\n." );
The code above won't run. What is wrong with it?
2 Answers
![Long Nguyen](https://secure.gravatar.com/avatar/ce75e1f83768f7a87219278104de11c9?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Long Nguyen
10,007 PointsYou have a couple syntax errors. First you're missing a closing bracket at the end of the if statement (You can always omit brackets if you have single line statements). Second you misspelled printf.
It should look like this:
if(firstExample.equalsIgnoreCase(thirdExample))
{
console.printf("first and third are the same ignoring case");
}
![Ted Clayton](https://secure.gravatar.com/avatar/75fd3a7afc43bca47a48e2aac12ae3a5?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ted Clayton
Courses Plus Student 206 PointsLong and Remi, Thank you for the reply. When I ran it yesterday it worked and I corrected printf and ended it with a closing curly bracket.
remi poolen
6,697 Pointsremi poolen
6,697 Pointsin this particular piece of code you are missing a closing curlybracket on your if-statement ( this one: } ). But i cant see the exact assignment or the errormessage so if this was not the correct solution maybe you can add the link to your exact code in the assignment?