Ajuda

Oi pessoal…
Estou com o seguinte erro, mas não sei porque…
Alguém poderia me ajudar??

public String getUnformatted(java.lang.Double a)
{
    String teste = getFormatted(a.doubleValue());//The method getFormatted() in the type Double is not applicable for the arguments (double)
    teste = teste.replace(',', '@');
    teste = teste.replace('.', '@');
    teste = teste.replaceAll("@", "");
    return teste;
}

Valeu,

OLa,

Dá uma olhada no metodo getFormatted, parece que ele não recebe uma arqumento do tipo double…

Não esta recebendo mesmo…
Mas é preciso??

Dentro do método getUnformatted eu preciso receber o método
getFormatted.
Porque na verdade eu irei recber um valor assim: 1000000.565656565
Dai o método getFormatted vai deixa-lo assim: 1.000.000,57
E o método unFormatted vai deixar assim: 100000057

public String getFormatted()
{
        DecimalFormatSymbols decimalFormat = new DecimalFormatSymbols();
        decimalFormat.setDecimalSeparator(',');
        decimalFormat.setGroupingSeparator('.');
        DecimalFormat myFormatter = new DecimalFormat("##,###,###,##0.00", decimalFormat);
        return myFormatter.format(value);
}

public String getUnformatted(java.lang.Double a) { a = new java.lang.Double(value.doubleValue()); String teste = getFormatted(a.doubleValue()); teste = teste.replace(',', '@'); teste = teste.replace('.', '@'); teste = teste.replaceAll("@", ""); return teste; }

Como faço isso??

Ola,

Bom, então só vc colocar a assinatura dele assim:

public String getFormatted(double value)

E uma coisa que notei… parece que vc tá usando o Format errado, ou inves te usar o DecimalFormatSymbols use o DecimalFormat apenas…