import java.util.Random;
public class Test{
public static void main(String[] args){
final Random r = new Random();
String ch = "aeiouycbdfgh";
int len = r.nextInt(10) + 10;
StringBuffer sb = new StringBuffer();
for (int i=0; i<len; i++){
sb.append(ch.charAt(r.nextInt(ch.length())));
}
System.out.println("String:" + sb);
System.out.println("Vowels:");
outputVowels(sb.toString());
}
public static void outputVowels(String s){
How do i make a for loop that will output the vowels of the ch string each in a different line?
edit: the program is meant to output a e i o u