About using variable inside of nested if
<pre><code>if(){
      String var=1; 
      if(var==-1){
        //do this
      }
      else
      {
         if()
         {        
           String myString=var; //This is where I want to use var
         }
      }
}
</code></pre>

<p>Now myString is not getting assigned the value of var..why is that ? It's nested if..it should get the value..isn't it ?  </p>
