Help with Mad Libs Module In Java

Hi,

I am new to Java and working in Mad Libs module. I am getting the following error message. Can someone please help? Code is also pasted below.

Error Message:
MadLibs.java:11: error: not a statement
String story = “This morning “+Jeff+”; woke up feeling “+Funny+”;. 'It is going to be a “+Smart day+!”; Outside, a bunch of “+Pennies+”; were protesting to keep “+Phones+”; in stores. They began to “+Flip+”; to the rhythm of the “+Girl+”; which made all the “+Rubix Cubes+”; very “+Stupid+”;. Concerned, “+Jeff+”; texted “+Joe+”; who flew “+Jeff+”; to “+Disney World+”; and dropped “+Jeff+”; in a puddle of frozen “+Guitar+”;. “+Jeff+”; woke up in the year “+five+”; in a world where “+Computers+”; ruled the world.”;

Code:
public class MadLibs {
/*This program generats a mad libbed story.
Author: Zaki
Date: 1/14/20
*/
public static void main(String args){

  //The template for the story
  String story = "This morning "+Jeff+"; woke up feeling "+Funny+";. 'It is going to be a "+Smart day+!"; Outside, a bunch of "+Pennies+"; were protesting to keep "+Phones+"; in stores. They began to "+Flip+"; to the rhythm of the "+Girl+"; which made all the "+Rubix Cubes+"; very "+Stupid+";. Concerned, "+Jeff+"; texted "+Joe+"; who flew "+Jeff+"; to "+Disney World+"; and dropped "+Jeff+"; in a puddle of frozen "+Guitar+";. "+Jeff+"; woke up in the year "+five+"; in a world where "+Computers+"; ruled the world.";
  
  System.out.println(story);
}       

}

Hello, @byte9119893422, and welcome to the forums.

The project had code that was pre-written before you started. It looks like you went through the value that had been assigned to the variable, story, and added numerous ;'s, and changed the variable names to what would appear to be values that you intended to be string literals to use in the story. Consider what you did, and what the error message says. In Java, statements end with a semicolon. Sprinkling semi-colons throughout what was a lengthy concatenated string value made a big mess.

I would suggest that you click the reset button image, and start over.
Carefully follow the instructions. The instructions for the project do not include changing the value assigned to story.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.