Question
Program will not run in Java. Please help with any errors. //CountMovieSpaces2.java import java.util.Scanner; public class CountMovieSpaces2 { public static void main(String[]args) { //create instance
Program will not run in Java. Please help with any errors.
//CountMovieSpaces2.java import java.util.Scanner; public class CountMovieSpaces2 { public static void main(String[]args) { //create instance of Scanner class Scanner keyboard=new Scanner(System.in); //declare string to read movie quote String movieQuote; //declare integer variable to count spaces int spaceCount=0; System.out.println("enter your favorite movie quote"); //prompt movie quote movieQuote=keyboard.nextLine(); //iterate over movieQuote string to find spaces for(int index=0); index
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started