aspose file tools*
The moose likes Beginning Java and the fly likes How do I get Calculation to Work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I get Calculation to Work" Watch "How do I get Calculation to Work" New topic
Author

How do I get Calculation to Work

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1478
    
    1
Here is my class. The accrate value comes out to be 0.0 every time.

g Peshone
Ranch Hand

Joined: Oct 20, 2008
Posts: 44
Why don�t you check result out of each query before going to next query?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19761
    
  20

Integer division always truncates. Cast to float / double to prevent this.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I get Calculation to Work