In querying data from a NUMBER column in the database that contains currency information (i.e. two decimal places of data), I am using the java FLOAT type as the destination variable type. On compilation, I get a warning: "Warning: Loss of precision possible in conversion from NUMERIC to column float rate." The warning isn't misplaced, because I am, and it's causing a problem. For example, 27.55 becomes 27.5499992370605.
What variable type should I be using for currency-type data? If FLOAT is correct, is there a way to fix the precision problem (other than simply rounding the result to two decimal places after the fact)?