MadLib project help

I keep getting the following error and I am not sure how to fix the code, would really appreciate some help:

MadLibs.java:9: error: cannot find symbol
System.out.println(story);
^
symbol: variable story
location: class MadLibs
1 error

At the point you call System.out.println(story), you have not yet defined the story variable, so it cannot be found. Try moving this print line to the end of your main method (after your story declaration).

2 Likes

That makes sense, thank you for the help!