VietBoyVS
04-25-2004, 11:47 PM
Hi guys & gals,
Is there a way in Java that I can convert a double type number such as 3.1111111111222 to only two decimal places? So it would be as 3.11 only?
Another question is how to do Stop a method from running in Java Code?
For example.. I'm doing a loop.. and a user input a 'char' type.
If it's match.. it stop excute.. other while it keeps going.
I know have to use input, and if and else statement.
Which I already did.. But I need a method to stop from running..
Please help...
Thank you so much.
Is there a way in Java that I can convert a double type number such as 3.1111111111222 to only two decimal places? So it would be as 3.11 only?
Another question is how to do Stop a method from running in Java Code?
For example.. I'm doing a loop.. and a user input a 'char' type.
If it's match.. it stop excute.. other while it keeps going.
I know have to use input, and if and else statement.
Which I already did.. But I need a method to stop from running..
Please help...
Thank you so much.