4. A simple logic that you can use is replacing all the alphabets other than vowels by "" and output the length of the remaining string. 5. use: ? 1 System.out.println("there is only one vowel in the string you entered and that is " + c); instead There can be other improve...
public class test { public static void main(String[] args) { String text = "C++"; System.out.println("Original string: "+text); System.out.println("Add a dash before and after every vowel in the said string: "+validate(text)); text = "Java"; System.out.println("\nOriginal string...