Shubham Sah

How to initialize a BigDecimal field

Discussion created by Shubham Sah on Mar 20, 2012
Latest reply on Mar 28, 2012 by Shubham Sah

Hi,

 

Suppose transactionAmount is a defined as a BigDecimal in the JAVA OM, how to initialize it and give it a default value.

 

Following code gives the error as shown below.

 

transactionAmount = 100.00;

 

 

Error: Explicit cast required to assign a 'real' to a 'BigDecimal' use 'as a BigDecimal'.

 

 

 

Kindly advise.

 

Thanks

Shubham

Outcomes