I am a beginner in java and am having trouble with printing out userinput with charAt(). I need to create a program that takes userinput and adds "op" before vowels in that text. (example: Userinput -> "Beautiful" would be translated as "Bopeautopifopul") I am struggling to figure how to write this. So far I have come up with this small bit.
import java.util.Scanner;
public class oplang {
static Scanner userinput = new Scanner(System.in);
public static void main(String[] args) {
char c ='a';
int n,l;
System.out.println("This is an Openglopish translator! Enter a word here to translate ->");
String message = userinput.nextLine();
System.out.println("Translation is:");
l = message.length();
for (n=0; n<l; n++);
{
c = message.charAt();
if (c != ' ');
{
System.out.println(" ");
}
c++;
}
}}