Repeat Exercise 5 in Chapter 7, but use an instance of ArrayList instead of an array. Exercise

Question:

Repeat Exercise 5 in Chapter 7, but use an instance of ArrayList instead of an array.


Exercise 5 in Chapter 7

Write a program in a class CharacterFrequency that counts the number of times a digit appears in a telephone number. Your program should create an array of size 10 that will hold the count for each digit from 0 to 9. Read a telephone number from the keyboard as a string. Examine each character in the phone number and increment the appropriate count in the array. Display the contents of the array.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: