Question: Write a program that counts the number of characters in a paragraph. Your task is to create 2 ArrayLists: one to save all the characters,

Write a program that counts the number of characters in a paragraph. Your task is tocreate 2 ArrayLists: one to save all the characters, and another to save the number of times the specific character appears in the paragraph.
Note:
Use Scanner to ask users to enter a paragraph
Some of the useful methods with ArrayList are contains, indexOf, get, set. You are free to use any
Convert all the words in the paragraph to lowercase first.
HashMap is a much better way to do this. But for this exercise, I want you to use ArrayList.
If your scanner input is this:
My name is Jack Ho. I am a full time professor at the San Jose Evergreen Community College District. I have been teaching computer science classes part time since 2017. This is my first semester as a full time professor. I also have been working in the high tech industry in Silicon Valley for over 20 years. Currently I consult for a start up company specialized in cybersecurity part time in downtown San Jose.
Your output should look like this below:
[m, y,, n, a, e, i, s, j, c, k, h, o,., f, u, l, t, p, r, v, g, d, b,2,0,1,7, w, z]
[13,10,73,22,22,41,30,29,3,18,2,10,20,6,7,9,14,25,8,23,5,5,4,3,2,2,1,1,3,1]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!