With regard to String handling in Java. The Funworks textbook has exercise 3.3.
In this exercise you are required to write Java String handling code that will . . .
- Find the first and last characters of a String.
- Print the String backwards.
- Sequentially harvest letters from the front and the end of the String until there are no more letters left.
- Find the middle character or characters of a String.
- Print out only the vowels in a String.
- Count the number of spaces in a String.
To do this one needs the following String handling methods – length, charAt, substring, indexOf, contains which are used used with conditional statements and for loops.