What is your value for PI? Also, the data type. I just tested this code and it works just fine. My only guess now is that your PI variable is set wrong :/
public static double volume (int r,...
Type: Posts; User: Parranoia
What is your value for PI? Also, the data type. I just tested this code and it works just fine. My only guess now is that your PI variable is set wrong :/
public static double volume (int r,...
For some odd reason it's returning a comma rather than the period. Try using this as your format "###.##"
Not too sure why it is returning a comma there though.
Your DecimalFormat object returns a String object. Use the Double class to parse the String and return a double value.