title: Difference of oracle.jbo.domain.Number and java.lang.Number
body: <p>I'm re-learning Java to work on an OAF (Oracle Application Framework) Page and I'm getting an error below due to a line in my code:</p>
  
  <p><strong>Code Line</strong></p>
  
  <p><code>Number attrValue = (Number)currRow.getAttribute("IctTrxHdrId");</code></p>
  
  <p><strong>Error Message</strong></p>
  
  <blockquote>
    <p>oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.jbo.domain.Number</p>
  </blockquote>
  
  <p>I was able to resolve this taking the advice from a post in <a href="https://community.oracle.com/thread/2316599?start=0" rel="nofollow noreferrer">Oracle Forums</a> that i should import <code>oracle.jbo.domain.Number</code> so that <code>attrValue</code> will use the <code>oracle.jbo.domain.Number</code> class instead of <code>java.lang.Number</code>.</p>
  
  <p>Also read from <a href="https://stackoverflow.com/questions/23320267/how-to-cast-numbers-like-int-to-number/23320280#23320280">another post on SO</a> that I can use the below syntax to use <code>oracle.jbo.domain.Number</code>:</p>
  
  <p><code>oracle.jbo.domain.Number attrValue = (oracle.jbo.domain.Number) currRow.getAttribute("IctTrxHdrId");</code></p>
  
  <p>I'm curious, What's the difference between the two classes?</p>