on 07-20-2009 11:50 AM
Hi Experts,
Following statement is not working. wdContext.nodeI_Catsdbcomm().getI_CatsdbcommElementAt(iCount).getCatshours() returns BigDecimal. We can not add int and BigDecimal. For resolving the issue I need to convert wdContext.nodeI_Catsdbcomm().getI_CatsdbcommElementAt(iCount).getCatshours() into integer. How we can do so?
Regards,
Gary
int sumHours=0;
sumHours = sumHours + wdContext.nodeI_Catsdbcomm().getI_CatsdbcommElementAt(iCount).getCatshours();
Gary,
The BigDecimal class has a method intValue(). So use
....).getCatshours().intValue();
See also [BigDecimal|http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html]
Hope this helps.
Regrads,
Alain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.