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!

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 Getting Started with Java Strings and Variables

error message

when typing the second string (" .. is learning to write Java"); it would not show up on the Console. the first line still did. after several attempts I tried to move on to the next instruction anyway, after typing \n at the end of each string I tried to run it again. now it comes up with an error message-

introductions.java:9: error: cannot find symbol console.printf(".. is learning to write Java\n"); ^ symbol: method print(string) location: Variable console of type Console 1 error

I have tried clearing the output, and deleting the code in the workspace, but when I type javac Introductions.java I still get this error message, even if this string is not shown anywhere else.

I have tried exiting the workspace and opening again, but because I saved it last with the error there it doesn't help.

does anyone know how I can get out of this and start again?


1 Answer

Stephen Bone
Stephen Bone
12,359 Points

Hi Sara

Are you able to post up all of your code for me?

I'm not immediately spotting an issue with the code you've provided so I wonder if you've missed a semi colon or something similar in an earlier line.



Stephen Bone
Stephen Bone
12,359 Points

You can delete your workspace by using the Workspaces link in the navigation bar on the left but hopefully if I can see your code we may be able to figure it out before it comes to that.