Project Language Families

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) { = langName;
this.numSpeakers = speakers;
this.regionsSpoken = regions;
this.wordOrder = wdOrder;

public void getInfo() {
System.out.println( + " 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");


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?

To preserve code formatting in forum posts, see: [How to] Format code in posts

Perhaps this may be be an issue,

// You wrote:
public static void main(Strings[] args){

// Change to:
public static void main(String[] args){

If this isn’t the issue, then post your formatted code. Also, share the exact command you are using to compile the program and the exact error message being shown.

1 Like