Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started