https://www.codecademy.com/courses/learn-java/projects/java-variables-mad-libs
I am unable to get System.out.println to work to print out the story. I have this as the story:
public class MadLibs {
/*
This program will generate a mad libbed story.
Author: Fico
Date: 1/21/2021
*/
public static void main(String args){
String name1 = "Katnip";
String adjective1 = "great";
String adjective2 = "wonderful";
String adjective3 = "pissed";
String verb1 = "be triggered";
String noun1 = "alien";
String noun2 = "Karens";
String noun3 = "CMFTs";
String noun4 = "Pope";
String noun5 = "Swedish Christmas soda";
String noun6 = "Weeabo";
String name2 = "Mama Nip";
int number = 2077;
String place1 = "Tampa";
System.out.println(story);
//The template for the story
String story = "This morning "+name1+" woke up feeling "+adjective1+". 'It is going to be a "+adjective2+" day!' Outside, a bunch of "+noun1+"s were protesting to keep "+noun2+" in stores. They began to "+verb1+" to the rhythm of the "+noun3+", which made all the "+noun4+"s very "+adjective3+". Concerned, "+name1+" texted "+name2+", who flew "+name1+" to "+place1+" and dropped "+name1+" in a puddle of frozen "+noun5+". "+name1+" woke up in the year "+number+", in a world where "+noun6+"s ruled the world.";
}
}
This is the error I am getting:
MadLibs.java:30: error: cannot find symbol
System.out.println(story);
^
symbol: variable story
location: class MadLibs
1 error
I declared all the variables and they all cleared but when I try to get String story to print out, it doesn’t work.