Rounding a number off to certain number of places Java
<p>Good afternoon</p>

<p>Would just like to know what the easiest way would be of rounding a value of to a certain number of decimal places in Java.</p>

<p>With C#.</p>

<pre><code>double answer;
double numberOne;
double numberTwo;
Console.WriteLine("Enter the numbers for your calculation");

numberOne = Double.Parse(Console.ReadLine());
numberTwo = Double.Parse(Console.ReadLine());
answer = numberOne / numberTwo;

Console.WriteLine(answer);
Console.WriteLine(Math.Round(answer, 3));
</code></pre>

<p>Kind regards</p>
