Question: My assignment is to write a Java program that displays the frequency of upper and lowercase letters from a string. This is my code so

My assignment is to write a Java program that displays the frequency of upper and lowercase letters from a string.

This is my code so far:

My assignment is to write a Java program that displays the frequency

but my output doesn't display letters:

of upper and lowercase letters from a string. This is my code

How do I fix my code so that the output becomes "The frequency of the letter A...The frequency of the letter B....etc" instead of numbers?

import java.util.Scanner public class main public static void main(String] args) Scanner keyboard-new Scanner(System.in) String text; Declare 2 arrays for upper and lower case letters intl upperCasenew int [26]; int[] lowe rcase# new int[26]; System.out.print("Enter a string: " textkeyboard.nexine0; /Initialize 26 location of both array with 0 for (inti-; i

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!