I can't set a value in a class
<p>I made two classes. The first one is the <code>Player</code> class and the second the <code>Bag</code>. What I want is to print the score of the player in <code>main()</code>. In <code>Bag</code>, I count the score and I want to set it in <code>Player</code>. This is a part of the <code>Bag</code> class  </p>

<pre><code> public void count( int number)
 { ............. 
   scr=k*2;//gives an int
   setScore(scr);//set the score in Player class
 }
</code></pre>

<p><strong>Player:</strong></p>

<pre><code>public class Player {

public Player() {
}

private String name;
private int score;

public Player(String name, int score) {
    this.name = name;
    this.score = score;
}
 public String getName() { 
     return name;
 }

public void setScore(int score) {
    this.score = score;
}

public int getScore() {
    return score;
}
</code></pre>

<p>In main() I try to print the score with this code but I can't:</p>

<pre><code>Player p=new Player();
System.out.println( p.getScore());
</code></pre>

<p>It returns me <code>score=0</code> (which I set it at the begging of main)<br>
I hope that you understand what I want to say.</p>
