修改对象的分数以获得值 2400 并显示它
modify score for object to get the value 2400 and display it
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
你的构造函数是错误的。不应该是score=0,应该是this.score=score
也应该是this.nom = nom
那你就可以了
Player player = new Player("nn", 2400)
System.out.println(player.toString())
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
你的构造函数是错误的。不应该是score=0,应该是this.score=score
也应该是this.nom = nom
那你就可以了
Player player = new Player("nn", 2400)
System.out.println(player.toString())