Here you can find the source of formatAnotherString(double valor)
public static String formatAnotherString(double valor)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; public class Main { public static String formatAnotherString(double valor) { DecimalFormat format = new DecimalFormat("#,##0.00"); return format.format(valor); }//from w w w . ja va 2 s . c o m }