Question: JAVA In this boolean method I want to detect if the input from command line args are pure letters and two symbols , and .

Search View Encoding Language Settings Tools Macro Run Plugins Window ? Anslyzer. java x import java.util.*; //import java util 7/ public class PhraseAnalyzerf / public static void main (String [] args) f 1 public static boolean isValidPhrase (String[] phrase) f for (String arg : phrase)f for (char c : arg. tochararray ()) f if (ICharacter. isLetter (c) as c!=,, s ct= sa tCharacter. iswhitespace (c)) I return false; 1// if not letter 1 /1 for al1 char in array 1 1/ for all elements in input array return true: 1 public static String[] getwords (String[] phrase) f 1 Public static string get.Smallestwords (String[] words) ( 16 public static String getLargestWords (String[] words) I I.. public static double getAverageWorldtength (Stringt) words) ( 1+x public static int [] getLetterTally(String[] words) t ASSUS@LAPTOP-SOMKDA2M MINGW64 /Project2/src $ java PhraseAnalyzer.java He7lo.World Sma77est word(s): He710, wor.7d Largest word(s): He17o, world Average word length: 5.00 Least frequently used letter(s):d, e, h, r,w Most frequently used letter(s):1 ASUS@LAPTOP-SOMKDAZM MINGW64 /Project2/src \$ java PhraseAna7yzer.java abc "t def Smallest word(s): abc, def Largest word(s): abc, def Average word length: 3.00 Least frequently used 7etter(s): a,b,c,d,e,f Most frequently used letter (s):a,b,c,d, e, f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
