turning double into percent values..
let's say i have a double value like this0.05989773557341125i want to turn it into a percentagei tried:int percent = (int) number*100;but it doesn't work and a zero comes out of it
[224 byte] By [
Nihcolasa] at [2007-11-27 9:08:44]

int percent = (int) number*100;
That casts number to an int (which rounds it down to 0) then multiplies it by 100.
int percent = (int) (number*100.0);
That does the multiplication on floating point types, then casts the result to an int, truncating the decimal part.
OP, you're having a great deal of trouble with your int casts, I see: http://forum.java.sun.com/thread.jspa?threadID=5189749&messageID=9742619#9742619Best to review this in a java book.