/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.text.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
double resultado= 93.13502;
System.
out.
println(format.
format(resultado
)); // 93.1
// se mudar o locale, o DecimalFormat muda sua config
System.
out.
println(format.
format(resultado
)); //93,1
// mas vc pode usar um com locale específico, sem depender do default
formatter.applyPattern("###,###.0");
System.
out.
println(formatter.
format(resultado
)); //93,1 }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLnRleHQuKjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJZG91YmxlIHJlc3VsdGFkbz0gOTMuMTM1MDI7CgkJTG9jYWxlLnNldERlZmF1bHQoTG9jYWxlLlVTKTsKCQlEZWNpbWFsRm9ybWF0IGZvcm1hdCA9IG5ldyBEZWNpbWFsRm9ybWF0KCIjIyMsIyMjLjAiKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oZm9ybWF0LmZvcm1hdChyZXN1bHRhZG8pKTsgLy8gOTMuMQoKICAgICAgICAvLyBzZSBtdWRhciBvIGxvY2FsZSwgbyBEZWNpbWFsRm9ybWF0IG11ZGEgc3VhIGNvbmZpZwoJCUxvY2FsZS5zZXREZWZhdWx0KG5ldyBMb2NhbGUoInB0IiwgIkJSIikpOwoJCWZvcm1hdCA9IG5ldyBEZWNpbWFsRm9ybWF0KCIjIyMsIyMjLjAiKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oZm9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