Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Want to use trunc function in groovy

user611775May 11 2011 — edited May 12 2011
I want to add transient attribute to my view object and make some calculation using Groovy
but I can't use trunc function
if ((EmpSal) - ((DefSal)*0.1) < 0){return 0} else {return ((EmpSal) - ((DefSal)*0.1))}
the problem that this calculation that i need to make is that

I want to make trunc for DefSal
like this
trunc((DefSal)*0.1)
but this generates error

can any one help me in this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2011
Added on May 11 2011
4 comments
434 views