Question: Complete the program named GetVowels below so that it reads in a string, finds all the vowels in that string, and prints out the vowels.

Complete the program named GetVowels below so that it reads in a string, finds all the vowels in that string, and prints out the vowels.

For example, given the input string of "Hello, World!", the program should print the string "eoo".

Complete the following file:

GetVowels.java

import java.util.Scanner;

/** Reads a string and prints out all vowels contained in that string. Vowels are A E I O U a e i o u.

Input: the value of s, a string Output: a string containing all the vowels in s, in the order in which they appear in s */ public class GetVowels { public static void main(String[] args) { String r = ""; Scanner in = new Scanner(System.in); String s = in.nextLine();

// your work here

System.out.println(r); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!