Java - Programming Language
This course covers the basics of programming in Java. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!

Building A Mad Libs Game

Lesson 11
Author : GOUP
Last Updated : September, 2020


Code

Copy// import java.util.Scanner;
Scanner keyboardInput = new Scanner(System.in);

System.out.print("Enter color: ");
String color = keyboardInput.nextLine();

System.out.print("Enter plural noun: ");
String pluralNoun = keyboardInput.nextLine();

System.out.print("Enter celebrity: ");
String celebrity = keyboardInput.nextLine();

System.out.println("Roses are " + color);
System.out.println(pluralNoun + " are blue");
System.out.println("I love " + celebrity);