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 trialCraig Morse
427 PointsError in my TreeStory workspace
This is the code I entered: String name = console.readLine("Enter your name: "); String adjective = console.readLine("Enter an adjective: "); console.printf("%s is very %s", name, adjective);
Craig Morse
427 PointsThe error is "reached end of file while parsing"
2 Answers
Craig Morse
427 PointsI guess the brackets on the bottom complete the code. I had deleted them.
Thank you for your help.
David Postlethwaite
9,355 PointsNo Problem glad I could help you solve the problem. Can you mark a best answer so that people know that your problem has been solved!
David Postlethwaite
9,355 PointsCraig, My workspace works with the code, have you checked the other code in the TreeStory class to see if your missing a bracket or a semi colon. Below is the code I used:
import java.io.Console;
public class TreeStory {
public static void main(String[] args) {
Console console = System.console();
/* Some terms:
noun - Person, place or thing
verb - An action
adjective - A description used to modify or describe a noun
Enter your amazing code here!
*/
String name = console.readLine("What is your name? ");
String adjective = console.readLine("Enter an adjective: ");
console.printf("%s is very %s", name, adjective);
}
}
David Postlethwaite
9,355 PointsDavid Postlethwaite
9,355 PointsCraig, What error are you getting? The code looks good,, what are you typing in the console to run the code.