title: Variable lifetime
body: <p>What happends to variable when line of execution goes outside of code block?
  For example:</p>
  
  <pre><code>1  public void myMethod()
  2  {
  3     int number;
  4     number = 5;
  5  }
  </code></pre>
  
  <p>so, we declare and set variable. When it goes outside of code block (line 5) what happends to variable number? </p>
  
  <p>Here is another example with creating instance of class:</p>
  
  <pre><code>7   public void myMethod()
  8   {
  9      Customer myClient;
  10     myClient = new Customer();
  11  }
  </code></pre>
  
  <p>When it goes outside of code block (line 11) what happends to object reference myClient? </p>
  
  <p>I guess in both cases variable is allocated but when it is deallocated?</p>