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

Java Java Basics Perfecting the Prototype Parsing Integers

Girri M Palaniyapan
Girri M Palaniyapan
7,829 Points

Why am I getting the error message asking me whether I used the static method Int parse ?

My actual line of code reads

int age = Integer.parseInt(answerToLife);

Thanks

2 Answers

In the task you are asked to create a variable named "answer". And yours is named "age". Try and see if it works.

Girri M Palaniyapan
Girri M Palaniyapan
7,829 Points

Thanks Krisitoan ! Your input was helpful.

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Girri;

The task is asking you to store the value in an integer called answer, not age. Change that and you should be golden for this challenge.

Happy coding,

Ken

Girri M Palaniyapan
Girri M Palaniyapan
7,829 Points

Thanks Kenneth for the swift and helpful reply.