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

Something wrong with compiler.

int age = 13; if (age < 13){

    console.printf("Sorry you must be at least 13 to use this program.\n");
    System.exit(0);


  }

Giving me symbol error.

TreeStory.java:11: error: cannot find symbol
console.printf("Sorry you must be at least 13 to use this program.\n");
^
symbol: variable console
location: class TreeStory
1 error

4 Answers

The "can't find symbol error" can mean:

  1. You made a typo. (most common)
  2. You forgot to declare a variable before using it.
  3. You are trying to use a member or method that doesn't exist.

console is undefined

Did you mean to write System.out.printf?

ya ok thanks guys its a new day so ill go have another look.

This page has the correct answer for the above issue so maybe delete this post. Thanks :)

https://teamtreehouse.com/community/java-symbol-error