View Single Post
  #1 (permalink)  
Old 08-05-2007, 06:05 PM
trill trill is offline
Member
 
Join Date: Jul 2007
Posts: 40
trill is on a distinguished road
Help with convert a double type number
Hi, 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 execute, 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.
Thanks.
Reply With Quote
Sponsored Links