Question: Problem 1 Write a Java program in a class CharacterFrequency that counts the number of times a digit appears in a telephone number. Your program

 Problem 1 Write a Java program in a class CharacterFrequency that

Problem 1 Write a Java 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. Sample output: Enter the telephone number: 009659369229 Digit: 0 Freq: 2 2 345 6 78 9 4 0 0 0

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 Databases Questions!