Java variables: madlibs project will not print!

public class MadLibs {
  /*
  This program generates a mad libbed story.
  Author: Violet
  Date: 4/01/2020
  */
  	public static void main(String[] args){
      
      String name1 = "Jon";
      String adjective1 = "Jumpy";
      String adjective2 = "Unequaled";
      String adjective3 = "Pure";
      String verb1 = "Running";
      String noun1 = "Wedding";
      String noun2 = "Recipe";
      String noun3 = "Gene";
      String noun4 = "Passion";
      String noun5 = "Collection";
      String noun6 = "Train";
      String name2 = "Jane";
      int number = 17;
      String place1 = "Saturn";

      
      
      
      
      
      
      
     
      
      
      
      
      
      
      // story is below on line 49
      
      
      
      
      
      
      
      
      
      //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.";
system.out.println(story);
    }       
}

when i try to run the code i get the following error:

MadLibs.java:50: error: package system does not exist
system.out.println(story);
      ^
1 error

what am i doing wrong?

okay so like, take 2 on the code, based on things i’ve seen in other codecademy posts for this topic (the code still won’t compile correctly):

public class MadLibs {
  /*
  This program generates a mad libbed story.
  Author: Violet
  Date: 4/01/2020
  */
  	public static void main(String[] args){

      
      
      
      
      
      
      
     
      
      
      
String name1 = "Jon";
String adjective1 = "Jumpy";
String adjective2 = "Unequaled";
String adjective3 = "Pure";
String verb1 = "Running";
String noun1 = "Wedding";
String noun2 = "Recipe";
String noun3 = "Gene";
String noun4 = "Passion";
String noun5 = "Collection";
String noun6 = "Train";
String name2 = "Jane";
int number = 17;
String place1 = "Saturn";
      
      
      // story is below on line 46
      
      
      
      
      
      
      
      
      
      //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.";
    }     
}

and now i get the following error message:

MadLibs.java:50: error: class, interface, or enum expected
System.out.println(story);
^
1 error

okay actually i figured it out!!! i think it might have been something about where i put the print command

Welcome back to the forum!

Your original error was that you wrote system.out.println where you should have used System.out.println. (Java is, for better or worse, case sensitive.)

In your second post, the code you’ve posted can’t have produced the error given underneath - because it contains no call to System.out.println():slight_smile:

case sensitivity? i hate that (i have realized after working through a few more java lessons that Case Matters in java. i hate it <3)

thank you!!!

It makes perfect sense when you consider, for example, that in ASCII encoding the codepoint for the character A is not the same as the codepoint for the character a. (Those being 65 and 97 respectively.)

They are, to the computer, two completely different things. :slight_smile:

this is true! but i got my start in like, computer things with front-end programming (CSS and HTML), which are not case-sensitive… so moving into back-end programming is a shock!