Question
Write a public static method named getWord that takes a String as a parameter and returns a String. The returned String is based on the
Write a public static method named getWord that takes a String as a parameter and returns a String. The returned String is based on the input String as follows: -If the input String has no characters, return "empty" -If the input String has less than 3 characters, return "short" -If the input String has 3 or more characters but less than 16, return "medium" -If the input String has greater than or equal to 16 characters, return "long" -If the input String contains any instances of the letter 'f', return "found f" regardless of the length of the input
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