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 trialArturs Dubra
4,748 PointsIn second task challenge it asks me "Did you add a constructor with a single 'int' parameter?" Yes I created with one.
I am not sure where I made a mistake, since I am not getting any errors in the preview window.
namespace Treehouse.CodeChallenges
{
class Frog
{
public readonly int TongueLength;
Frog(int tongueLength)
{
TongueLength = tongueLength;
}
}
}
1 Answer
Jennifer Nordell
Treehouse TeacherOooooo so close! You forgot to specify the scope of the constructor. Take a look:
namespace Treehouse.CodeChallenges
{
class Frog
{
public readonly int TongueLength;
public Frog(int tongueLength) {
}
}
}
Happy coding!
Arturs Dubra
4,748 PointsArturs Dubra
4,748 PointsThanks for help :)
Actually the code you shared is for step 3 of the challenge!
I am not 100% sure, but I was able to get trough task 2 and 3 with the same code!