This is my code:
class Language {
protected String name;
protected int numSpeakers;
protected String regionsSpoken;
protected String wordOrder;
Language (String langName, int speakers, String regions, String wdOrder) {
this.name = langName;
this.numSpeakers = speakers;
this.regionsSpoken = regions;
this.wordOrder = wdOrder;
}
public void getInfo() {
System.out.println(this.name + " is spoken by " + this.numSpeakers + " people mainly in " + this.regionsSpoken + “.”);
System.out.println("The language follows the word order: " + this.wordOrder);
}
public static void main(Strings args){
Language spanish = new Language("Spanish", 555000000, "Spain, Latin America, and Equatorial Guinea", "subject-verb-object");
spanish.getInfo();
}
}
There is a problem when i run the code in the terminal:
error: Class names, ‘Language,java’, are only accepted if annotation processing is explicitly requested.
Does anyone know where i go wrong?