title: Change value of a variable x in main method through running thread
body: <pre><code>public static void main(String args[]) throws Exception {
      int maxScore = 0;
  
  Thread student = new Thread(client,????);
  student.start();
  }
  </code></pre>
  
  <p>I want student thread to change value of maxScore, how do I do it in Java? (Like in C we can pass the address of maxScore)</p>