J
Jazz
Hello All I would like to round a double to 2 decimal places...
I have the following two integers:
protected int stackEmptiedCount; //the number of times a stack is Emptied
protected int noOfPlates; //number of Plates
Then I want to display it:
System.out.println("Average stack size before emptying: " +
noOfPlates/stackEmptiedCount + "\n");
Obviously it gets truncated...cause its a integer...any easy way to display
it as say a 2.47...
Thanks
Jazz
I have the following two integers:
protected int stackEmptiedCount; //the number of times a stack is Emptied
protected int noOfPlates; //number of Plates
Then I want to display it:
System.out.println("Average stack size before emptying: " +
noOfPlates/stackEmptiedCount + "\n");
Obviously it gets truncated...cause its a integer...any easy way to display
it as say a 2.47...
Thanks
Jazz