I am a beginner at java and I am doing this course an needed some help with this. Basically, a user will input a string and then the program will print out only the vowels on one line.
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
System.out.print("In:");
String word = inp.nextLine();
//write your code below
for(int whatsat = 0; whatsat < word.length(); whatsat++){
if (word.charAt(whatsat).equals("a")){ //how to declare mutiple letters?
System.out.print(word.charAt(whatsat));
}
}
}
}