I’m trying to do some basic math and it keeps popping up as 0. I’m sure it has to do with it being an int but I don’t know how to work around it. I need to use integers but the math to arrive at those integers uses decimals. How do I do it?
I’m trying to do some basic math and it keeps popping up as 0
Share
This is not special to blackberry, it’s standard java behaviour.
This is because you’re doing integer math:
Use a double instead or change the order