Question: Write a complete main method that does the following: Takes 1 command line argument (a string) and determines if there are more upper case or
Write a complete main method that does the following:
-
Takes 1 command line argument (a string) and determines if there are more upper case or lower case letters in the string. (Hint: The Character wrapper class contains the boolean methods isUpperCase and isLowerCase)
-
If there is not at least one command line argument, throw an IllegalArgumentException with an appropriate message.
For example,
C:>java Question1 This IS THE input String There are more lower case letters.
public class Question1 { public static void main (String args[]) { } //main } // class Question1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
