I am currently getting an error requesting that certain identifiers are expected as I try to translate this C# code:
public static List<string> stopWords = new List<string> {"ON","OF","THE","AN","A" };
current faulty Java code:
public static List<String> stopWords = new ArrayList<String {"ON","OF","THE","AN","A" };
You could use
List<String> stopWords = new ArrayList<>(Arrays.asList("ON","OF","THE","AN","A" ));