title: Assign null to Variables, That Are No Longer Needed in Java
body: <p>I went through the following <a href="https://docs.oracle.com/cd/E19159-01/819-3681/abebi/index.html" rel="nofollow noreferrer">link</a> on oracle official site regarding performance tuning, which states
  "Assigning null to unused variable ease garbage collector to reclaim the memory"</p>
  
  <p>Do I need to adopt the following code practice?</p>
  
  <pre><code>Student student = new Student(100L, "Brian Lara", "II", "B");
  public String getSomeValue() {
      String val = "";
      try {
          // Perform some action to get value using student ref. variable
          // val = some val, using student 
      }
      finally {
          this.student = null;
      }
      return val;
  }
  </code></pre>
  
  <ul>
  <li>There are 3 possibilities (or may be more) for the instance variable: 
  
  <ol>
  <li>Global static instance variable</li>
  <li>Global non static instance variable</li>
  <li>Local non static instance variable</li>
  </ol></li>
  </ul>
  
  <p>Please suggest the correct way for the better coding practice. </p>