Problems with Java language project in inherited problem

My code won’t compile at all. It is from the project in the java polymorphism lesson. I changed in the main to Language french = new Language(); but it still won’ work uclass Language {
protected String name;
protected int numSpeakers;
protected String regionsSpoken;

protected String wordOrder;

public 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(String args) {
Language french = new Language(“French”, 70000000, “France, Switzerland, and Quebec”, “subject-verb-object”);
french.getInfo();

}

}

It never hurts to include a link to the exercise; just saying.

2 Likes

You know what is funny? I – p of the error message – figured out what the problem was and made that portion of the code work. I am getting a little better at this nervousness. It may take me a year to get over my nervousness. I have been getting a little better at seeing how the code moves through the computer; e,g, the for each loop.

Inherited problems in Java projects can arise from improper use of inheritance, such as tight coupling, lack of flexibility, and difficulty in maintaining code. These issues often result in code duplication, conflicts, and difficulty in overriding or extending base class behavior.