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


can someone please help me with my code.

i am trying to find if a person is minor or major import java.io.Console; public class kunal{ public static void main(String args[]){ string age = Console.readLine("tell me your age "); int kun = integer.parseint(age);

    if (kun<18){Console.printf("you are minor");}
    if (kun>=18){Console.printf("you are a major");}


What is it doing? or not doing? Do you get an error?

1 Answer

Logan R
Logan R
22,989 Points

I can't check as I'm about to leave and you're code is slightly messed up, but I bet you it's the following line:

 int kun = integer.parseint(age);

Should be:

int kun = Integer.parseInt(age);

It's cap sensitive.