I have been presented with a problem for my Java class and I have no idea how to go about it. My professor barely covered loops. I have no idea how to solve this.
Here is the project objective:
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();
System.out.println(r);
}
}