Answer:
import java.util.*;
public class Main
{
public static void main(String[] args) {
System.out.println(grammar("A excellent word"));
}
public static String grammar(String phrase) phrase.charAt(2) == 'o'
}
Step-by-step explanation:
Create a function called grammar that takes one string parameter, phrase
Check if the character after "A", is one of the vowels, using charAt function. If it is, then insert "n" after "A". (To insert "n", concatenate two parts: "An", and the substring of the initial string after A).
Otherwise, return the initial string