1234567891011121314151617 |
- public class StringUtilities {
- public Character getMiddleCharacter(String word){
- char midLetter;
- return midLetter = word.charAt(word.length() / 2);
-
- }
-
- public String removeCharacter(String value, char charToRemove){
- String result = value.replace(Character.toString(charToRemove), "");
- return result;
- }
-
- public String getLastWord(String value) {
- return value.substring(value.lastIndexOf(" ")+1);
- }
- }
|