Hello I'm new to java , could u plz help me with this, I want to create an instance player in game class and modify score to get the value 2400 and display it
Your constructor is wrong. It shouldn't be score=0, it should be this.score=score
this.score=score
And it should also be this.nom = nom
this.nom = nom
Then you can just do
Player player = new Player("nn", 2400)
System.out.println(player.toString())