Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please I need help. in Java Method name: lowestAlphabetically Parameter(s): A String of lower-case words separated by spaces and made up of the letters a-z.
Please I need help. in Java
- Method name: lowestAlphabetically Parameter(s): A String of lower-case words separated by spaces and made up of the letters a-z. The String will have at least one word. Return value: A String containing the lowest alphabetical word. The String method compareTo() does a lexicographic comparison between two strings, which allows you to test for the lowest alphabetical word. Read documentation on compareTo() in order to understand how to use it. Example: lowestAlphabetically("cat dog apple fish") would return "apple".
- Method name: smallestNumberInTwoStrings Parameter(s): Two String parameters. Each string is made up of numbers separated by spaces. The first string must have at least one number. Return value: An int containing the smallest number found in the two strings. Example: findSmallestNumberInTwoStrings("12 3 5", "2 -1 10") would return -1.
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