SlideShare a Scribd company logo
1 of 1
Download to read offline
Write an application that counts the total number of spaces contained in a movie quote entered
by the user. Save the file as CountMovieSpaces2.java
Solution
CountMovieSpaces2.java
import java.util.Scanner;
public class CountMovieSpaces2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter the movie quote: ");
String quote = scan.nextLine();
int countSpaces = 0;
for(int i=0; i

More Related Content

More from calderoncasto9163

How is the Internet come about How was the World Wide Web ( WWW .pdf
How is the Internet come about  How was the World Wide Web ( WWW .pdfHow is the Internet come about  How was the World Wide Web ( WWW .pdf
How is the Internet come about How was the World Wide Web ( WWW .pdfcalderoncasto9163
 
Explain the answers in sufficient details i.e show the work ace Wha.pdf
Explain the answers in sufficient details i.e show the work ace Wha.pdfExplain the answers in sufficient details i.e show the work ace Wha.pdf
Explain the answers in sufficient details i.e show the work ace Wha.pdfcalderoncasto9163
 
Each figure is an isometry image of the figure at the right. Tell whe.pdf
Each figure is an isometry image of the figure at the right. Tell whe.pdfEach figure is an isometry image of the figure at the right. Tell whe.pdf
Each figure is an isometry image of the figure at the right. Tell whe.pdfcalderoncasto9163
 
E. None of the above.E. Actually, they differ in all of these ways.pdf
E. None of the above.E. Actually, they differ in all of these ways.pdfE. None of the above.E. Actually, they differ in all of these ways.pdf
E. None of the above.E. Actually, they differ in all of these ways.pdfcalderoncasto9163
 
Describe the difference between a. The pulmonary and systemic circula.pdf
Describe the difference between a. The pulmonary and systemic circula.pdfDescribe the difference between a. The pulmonary and systemic circula.pdf
Describe the difference between a. The pulmonary and systemic circula.pdfcalderoncasto9163
 
Cross a homozygous running, heterozygous black mouse with a waltzing.pdf
Cross a homozygous running, heterozygous black mouse with a waltzing.pdfCross a homozygous running, heterozygous black mouse with a waltzing.pdf
Cross a homozygous running, heterozygous black mouse with a waltzing.pdfcalderoncasto9163
 
Describe some effects that cybertechnology has had so far for our se.pdf
Describe some effects that cybertechnology has had so far for our se.pdfDescribe some effects that cybertechnology has had so far for our se.pdf
Describe some effects that cybertechnology has had so far for our se.pdfcalderoncasto9163
 
Choose a deployment platform that allows for the implementation o.pdf
Choose a deployment platform that allows for the implementation o.pdfChoose a deployment platform that allows for the implementation o.pdf
Choose a deployment platform that allows for the implementation o.pdfcalderoncasto9163
 
Abstract Base Class (C++ Program)Create an abstract base class cal.pdf
Abstract Base Class (C++ Program)Create an abstract base class cal.pdfAbstract Base Class (C++ Program)Create an abstract base class cal.pdf
Abstract Base Class (C++ Program)Create an abstract base class cal.pdfcalderoncasto9163
 
A range of values estimated to have a high probably of containing th.pdf
A range of values estimated to have a high probably of containing th.pdfA range of values estimated to have a high probably of containing th.pdf
A range of values estimated to have a high probably of containing th.pdfcalderoncasto9163
 
A thrown lump of clay hits a block in mid air and sticks to it. what.pdf
A thrown lump of clay hits a block in mid air and sticks to it. what.pdfA thrown lump of clay hits a block in mid air and sticks to it. what.pdf
A thrown lump of clay hits a block in mid air and sticks to it. what.pdfcalderoncasto9163
 
Answer die following questions with short answers Explain the d.pdf
Answer die following questions with short answers  Explain the d.pdfAnswer die following questions with short answers  Explain the d.pdf
Answer die following questions with short answers Explain the d.pdfcalderoncasto9163
 
A single breeding pair of rabbits is introduced to Australia in 1900.pdf
A single breeding pair of rabbits is introduced to Australia in 1900.pdfA single breeding pair of rabbits is introduced to Australia in 1900.pdf
A single breeding pair of rabbits is introduced to Australia in 1900.pdfcalderoncasto9163
 
Write a java program using Dialog boxes that prompt the user to inpu.pdf
Write a java program using Dialog boxes that prompt the user to inpu.pdfWrite a java program using Dialog boxes that prompt the user to inpu.pdf
Write a java program using Dialog boxes that prompt the user to inpu.pdfcalderoncasto9163
 
With respect to the many accounting and financial ratios calculated .pdf
With respect to the many accounting and financial ratios calculated .pdfWith respect to the many accounting and financial ratios calculated .pdf
With respect to the many accounting and financial ratios calculated .pdfcalderoncasto9163
 
Why do we use the pooled variance in calculations of independent sam.pdf
Why do we use the pooled variance in calculations of independent sam.pdfWhy do we use the pooled variance in calculations of independent sam.pdf
Why do we use the pooled variance in calculations of independent sam.pdfcalderoncasto9163
 
Why is the epidermis called dynamicSolutionAnswerThe o.pdf
Why is the epidermis called dynamicSolutionAnswerThe o.pdfWhy is the epidermis called dynamicSolutionAnswerThe o.pdf
Why is the epidermis called dynamicSolutionAnswerThe o.pdfcalderoncasto9163
 
Which type of system documentation provides the most detaila. Sys.pdf
Which type of system documentation provides the most detaila. Sys.pdfWhich type of system documentation provides the most detaila. Sys.pdf
Which type of system documentation provides the most detaila. Sys.pdfcalderoncasto9163
 
What type of report would you present to your boss on healthcare stu.pdf
What type of report would you present to your boss on healthcare stu.pdfWhat type of report would you present to your boss on healthcare stu.pdf
What type of report would you present to your boss on healthcare stu.pdfcalderoncasto9163
 
what are ethical implications of not paying your fair share of tax.pdf
what are ethical implications of not paying your fair share of tax.pdfwhat are ethical implications of not paying your fair share of tax.pdf
what are ethical implications of not paying your fair share of tax.pdfcalderoncasto9163
 

More from calderoncasto9163 (20)

How is the Internet come about How was the World Wide Web ( WWW .pdf
How is the Internet come about  How was the World Wide Web ( WWW .pdfHow is the Internet come about  How was the World Wide Web ( WWW .pdf
How is the Internet come about How was the World Wide Web ( WWW .pdf
 
Explain the answers in sufficient details i.e show the work ace Wha.pdf
Explain the answers in sufficient details i.e show the work ace Wha.pdfExplain the answers in sufficient details i.e show the work ace Wha.pdf
Explain the answers in sufficient details i.e show the work ace Wha.pdf
 
Each figure is an isometry image of the figure at the right. Tell whe.pdf
Each figure is an isometry image of the figure at the right. Tell whe.pdfEach figure is an isometry image of the figure at the right. Tell whe.pdf
Each figure is an isometry image of the figure at the right. Tell whe.pdf
 
E. None of the above.E. Actually, they differ in all of these ways.pdf
E. None of the above.E. Actually, they differ in all of these ways.pdfE. None of the above.E. Actually, they differ in all of these ways.pdf
E. None of the above.E. Actually, they differ in all of these ways.pdf
 
Describe the difference between a. The pulmonary and systemic circula.pdf
Describe the difference between a. The pulmonary and systemic circula.pdfDescribe the difference between a. The pulmonary and systemic circula.pdf
Describe the difference between a. The pulmonary and systemic circula.pdf
 
Cross a homozygous running, heterozygous black mouse with a waltzing.pdf
Cross a homozygous running, heterozygous black mouse with a waltzing.pdfCross a homozygous running, heterozygous black mouse with a waltzing.pdf
Cross a homozygous running, heterozygous black mouse with a waltzing.pdf
 
Describe some effects that cybertechnology has had so far for our se.pdf
Describe some effects that cybertechnology has had so far for our se.pdfDescribe some effects that cybertechnology has had so far for our se.pdf
Describe some effects that cybertechnology has had so far for our se.pdf
 
Choose a deployment platform that allows for the implementation o.pdf
Choose a deployment platform that allows for the implementation o.pdfChoose a deployment platform that allows for the implementation o.pdf
Choose a deployment platform that allows for the implementation o.pdf
 
Abstract Base Class (C++ Program)Create an abstract base class cal.pdf
Abstract Base Class (C++ Program)Create an abstract base class cal.pdfAbstract Base Class (C++ Program)Create an abstract base class cal.pdf
Abstract Base Class (C++ Program)Create an abstract base class cal.pdf
 
A range of values estimated to have a high probably of containing th.pdf
A range of values estimated to have a high probably of containing th.pdfA range of values estimated to have a high probably of containing th.pdf
A range of values estimated to have a high probably of containing th.pdf
 
A thrown lump of clay hits a block in mid air and sticks to it. what.pdf
A thrown lump of clay hits a block in mid air and sticks to it. what.pdfA thrown lump of clay hits a block in mid air and sticks to it. what.pdf
A thrown lump of clay hits a block in mid air and sticks to it. what.pdf
 
Answer die following questions with short answers Explain the d.pdf
Answer die following questions with short answers  Explain the d.pdfAnswer die following questions with short answers  Explain the d.pdf
Answer die following questions with short answers Explain the d.pdf
 
A single breeding pair of rabbits is introduced to Australia in 1900.pdf
A single breeding pair of rabbits is introduced to Australia in 1900.pdfA single breeding pair of rabbits is introduced to Australia in 1900.pdf
A single breeding pair of rabbits is introduced to Australia in 1900.pdf
 
Write a java program using Dialog boxes that prompt the user to inpu.pdf
Write a java program using Dialog boxes that prompt the user to inpu.pdfWrite a java program using Dialog boxes that prompt the user to inpu.pdf
Write a java program using Dialog boxes that prompt the user to inpu.pdf
 
With respect to the many accounting and financial ratios calculated .pdf
With respect to the many accounting and financial ratios calculated .pdfWith respect to the many accounting and financial ratios calculated .pdf
With respect to the many accounting and financial ratios calculated .pdf
 
Why do we use the pooled variance in calculations of independent sam.pdf
Why do we use the pooled variance in calculations of independent sam.pdfWhy do we use the pooled variance in calculations of independent sam.pdf
Why do we use the pooled variance in calculations of independent sam.pdf
 
Why is the epidermis called dynamicSolutionAnswerThe o.pdf
Why is the epidermis called dynamicSolutionAnswerThe o.pdfWhy is the epidermis called dynamicSolutionAnswerThe o.pdf
Why is the epidermis called dynamicSolutionAnswerThe o.pdf
 
Which type of system documentation provides the most detaila. Sys.pdf
Which type of system documentation provides the most detaila. Sys.pdfWhich type of system documentation provides the most detaila. Sys.pdf
Which type of system documentation provides the most detaila. Sys.pdf
 
What type of report would you present to your boss on healthcare stu.pdf
What type of report would you present to your boss on healthcare stu.pdfWhat type of report would you present to your boss on healthcare stu.pdf
What type of report would you present to your boss on healthcare stu.pdf
 
what are ethical implications of not paying your fair share of tax.pdf
what are ethical implications of not paying your fair share of tax.pdfwhat are ethical implications of not paying your fair share of tax.pdf
what are ethical implications of not paying your fair share of tax.pdf
 

Recently uploaded

The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 

Recently uploaded (20)

OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 

Write an application that counts the total number of spaces containe.pdf

  • 1. Write an application that counts the total number of spaces contained in a movie quote entered by the user. Save the file as CountMovieSpaces2.java Solution CountMovieSpaces2.java import java.util.Scanner; public class CountMovieSpaces2 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter the movie quote: "); String quote = scan.nextLine(); int countSpaces = 0; for(int i=0; i