Java - returning a BigDecimal from a function? : <p>I was wondering if I can actually return a BigDecimal from a function as I have not seen anything online about this. Is it because it's not possible or is it really just bad practice to do so? Attempting the code below results in "error: cannot find symbol [in MainClass.java]"</p>

<pre><code>public BigDecimal foo(){
    return new BigDecimal(10);
}
</code></pre>
