title: Assigning Number to int
body: <p>I'm currently translating an application from actionscript-3 to Java code and got stuck with a variable assignment problem.</p>
  
  <p>There is such block in as3 application:</p>
  
  <pre><code>var num:*=0;
  ...
  num = 5.5;
  </code></pre>
  
  <p>As far as I understand AS3, variable is declared of an unknown type, which is resolved during the first assignment <code>=0</code> meaning it will become <code>int</code>. Am I right?</p>
  
  <p>So does that mean that by assigning 5.5 to it, the Number will be converted to int, and I will have <code>num==5</code> in the result? Or will it become Number after assigning Number to it?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Added:</strong>
  Sorry, but I don't have any Flash environment to test it myself. I'm converting one of the utility methods from actionscript to Java and got stuck with this problem.</p>
  
  <p><strong>Added 2:</strong>
  The question is, if num will contain <code>5</code> or <code>5.5</code> at the end of this block?</p>