Question about a Madlib Error in Java

Hi, when I run the following program, I get the error message: Can someone please let me know what the error is in the program? Thanks.

MadLibs.java:10: error: illegal start of expression
String story = "This morning “+name1+” woke up feeling "+adjective1+;
^
1 error

public class MadLibs {
  /* This [program generates a mad libbed story.]
     Author: Zaki
     Date: 4/9/20
  */
  	public static void main(String[] args){
      
    String name1= "Lucas";
    String adjective1= "Funny";
    String story = "This morning "+name1+" woke up feeling "+adjective1+;
    System.out.println(story);
    }
}

Hey @byte9119893422 , I formatted your code. Go ahead and check out this post as a reference on how to do this.

About your error, take a look at the value you’re assigning to story… does that look right to you? :slight_smile:

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