title: How to get two value after the decimal for the result of distance
body: <p>To calculate the distance between two places;with the two lat and longi using this link too
  <a href="https://stackoverflow.com/questions/837872/calculate-distance-in-meters-when-you-know-longitude-and-latitude-in-java/837957#837957">Calculate distance in meters when you know longitude and latitude in java</a></p>
  
  <p>i got my result as metre like 2.4737676E-5,its a float value too.</p>
  
  <p>i want to take as first two values only after decimal.But using the decimal format and string format also i couldn't get my expected result like(2.47)..its coming as 0.00 only.</p>
  
  <pre><code>&gt;  float meanwhiledist=distFrom(latti,longii,curlat,curlongi);
  &gt;                  DecimalFormat df2 = new DecimalFormat( "#.00"); 
  &gt;                  double dd2dec = new Double(df2.format(meanwhiledist));
  
                           or
  
             Double dd = Double.valueOf(meanwhiledist);
             String angleFormated = String.format("%.2f", dd);
  
  if i print angleformated and dd2dec my result coming as 0.00        
  </code></pre>