Question: /* * Write a Java method called getAlphabetLetterCount that accepts a string as a parameter, * and returns the number of alphabetical letters contained in

/* * Write a Java method called getAlphabetLetterCount that accepts a string as a parameter, * and returns the number of alphabetical letters contained in this string. * The input string may contain lowercase or uppercase letters. */ import java.util.Scanner; public class StringTest { // YOUR METHOD of getAlphabetLetterCount Here public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("Please enter a string: "); String s = console.nextLine(); console.close(); System.out.println("There are " + getAlphabetLetterCount(s) + " digital letters in the string."); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
