Android examples for java.lang:Math Formula
Formula to format Result
//package com.java2s; import java.text.DecimalFormat; public class Main { public static String formatResult(double result) { DecimalFormat fourDForm = new DecimalFormat("#0.0000"); String resultFormated = fourDForm.format(result); return resultFormated; }/*from ww w.j av a2s . c om*/ }