Write the method String convertPhone(String number) in Java that implements the following logic: Given a phone number as a string of...
Search Results
Searching for: Java
Individual Exercises
Write the method boolean hasPrefix(String word) in Java that returns true if the string in word begins with one of these prefixes:
"pre",...
Write the method boolean hasSuffix(String word) in Java that returns true if the string in word ends with one of these suffixes:
"er",...
Write the method boolean containsRoot(String word) in Java that returns true if the string in word contains inside (see below) one of...
Description
Given a string, compute recursively a new string where all spaces in the original one are replaced by an underscore (_).
So...
Description
Given a string, compute recursively a new string where all the adjacent chars are now separated by an underscore ("_"). So...
Given a string, compute recursively a new string where a space is removed and the next letter is converted to uppercase.
So given "Hello...
Given a string, compute recursively a new string where uppercase letters in the original one are preceeded with a space in the new...
Description
Given a string, compute recursively a new string where all vowels in the original string will now be in upper case in the new...
Description
Write a recursive Java method that removes adjacent duplicate characters from a String. If two identical characters appear...
Description
In mathematics, the Pell Numbers follow a familiar recursive structure:
P(n) = 2 * P(n - 1) + P(n - 2) for n > 2
with...