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 trialUnsubscribed User
Courses Plus Student 599 PointsCompiler was mistaken i guess
i couldn't see my mistakes but compiler said that Did you crate new EatFly method bla bla ,thanks
namespace Treehouse.CodeChallenges
{
class Frog
{
public readonly int TongueLength;
public readonly int ReactionTime;
public Frog(int tongueLength,int reactionTime)
{
TongueLength = tongueLength;
ReactionTime=reactionTime;
}
public bool EatFly(int distanceToFly , int flyReactionTime)
{
return TongueLength>= distanceToFly && ReactionTime<=flyReactionTime;
}
public bool EatFly(int distanceToFly)
{
return TongueLength >= distanceToFly;
}
}
}
1 Answer
Steven Parker
231,269 PointsYou're going to love this...
Apparently, the challenge does not like the space between distanceToFly and the comma in the parameter list.
Remove that space to pass the challenge.
You may want to report this one as a bug on the Support Page. It might even get you the "special Exterminator badge".
Jennifer Nordell
Treehouse TeacherOh wow, great catch Steven Parker! I was looking at this and didn't spot it. Well done
Unsubscribed User
Courses Plus Student 599 Pointsi pressed the check button 4 or 5 times and it worked :D
Antonio Rodrigues
2,306 PointsAntonio Rodrigues
2,306 PointsCould you post the exact exception message ?