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 Local Development Environments Advanced Tooling Teamwork

Unable to complete challenge. Java files compiled and tested in IntelliJ and worked just fine.

Hello.

I am unable to complete the challenge.

This is the error: "Bummer: Looks like you didn't present the TreeStory (3)..." However, I already added the part to present the tree story in Prompter.run method...


public void run(Template tmpl) {
    List<String> results = null;
    try {
        results = promptForWords(tmpl);

    } catch (IOException e) {
        System.out.println("There was a problem prompting for words");
        e.printStackTrace();
        System.exit(0);
    }

    String storyResult = tmpl.render(results); // <<<<<<<<<<<<<<<
    System.out.printf("Your TreeStory:%n%n%s", storyResult); // <<<<<<<<<<<<<<<
}

I think I already completed the objective because I compiled and tested the updated jave files in IntelliJ and it worked just fine.

Thank you in advance! :)

1 Answer

Try printing the story without formatting. (println instead of printf)