Java: Delete Blanks - Solution
This page discusses - Java: Delete Blanks - Solution.
Exercise - Trim Right
Write a method that returns a string with all trailing blanks from the right end of its string parameter..
Programming - reverse() method
Write a method which has one parameter, a string, which returns a string which is the parameter will all characters reversed..
Programming - Replace method
The predefined Java function replace may not be used for this -- you have to write it yourself..
Exercise - Palindrome
Write a method which returns true if the string parameter is a palindrome..
Exercise - Pad Left
Write a method to return a string which is the parameter with add extra blanks to the left end to make it length width..
Programming - max3() method
Write a method which has three double parameters and returns the largest value..
Exercise - Count Words
Write a method which counts the number of words in a string..
Programming - countVowels() method
Write a method which has one parameter, a string, and it returns the int number of vowels (a e i o u) in the string..
Programming - Count Vowels - main
Write a program that reads a string and displays the number of vowels in it..
Exercise - Count Words
Write a method which counts the number of words in a string. Assume that a word is defined as a sequence of letters..
Exercise - Delete Blanks
Write a method to delete all blanks from its parameter..