cast Long to BigDecimal

Suresh picture Suresh · May 28, 2009 · Viewed 86.1k times · Source

How can I cast Long to BigDecimal?

Answer

Silfverstrom picture Silfverstrom · May 28, 2009

You'll have to create a new BigDecimal.

BigDecimal d = new BigDecimal(long);