MadLibs Java Error

public class MadLibs {
This program generates a mad libbed story.
Author: J
Date: 3/6/2023
public static void main(String args){

  String name1 = "Pikachu" ;
  String adjective1 = "Mad" ;
  String adjective2 = "Happily" ;
  String adjective3 = "Loudly" ;
  String verb1      = "Walking" ;
  String noun1      = "Book" ;
  String noun2      = "Art" ;
  String noun3      = "City" ;
  String noun4      = "Doctor" ;
  String noun5      = "Park" ;
  String noun6      = "Television" ;
  String name2      = "Charmander" ;
  int number        = 7; 
  String place1 = "Miami" ;

//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.printIn(story) ;



It keeps saying there is 1 error in the Systems.out.printIn(story) ;

β€œ error: reached end of file while parsing
System.out.printIn(story) ;
1 error”

What’s wrong with my code? Thanks for taking the time to help. I’m a beginner, lol.

method name is println with a lowercase β€œL”, not printIn with an uppercase β€œi”.

change it to lowercase L and you’re good.

1 Like