BigDecimal: currency fractions

master
bvn13 2022-08-13 03:18:37 +03:00
parent eb1620c483
commit b64682a003
1 changed files with 9 additions and 4 deletions

View File

@ -5,10 +5,15 @@ import java.util.Currency;
public class BigDecimalExample { public class BigDecimalExample {
public static void main(String[] args) { public static void main(String[] args) {
fromInteger(); // fromInteger();
fromFloat(); // fromFloat();
a(); // a();
b(); // b();
Currency eur = Currency.getInstance("EUR");
System.out.println("EUR: " + eur.getDefaultFractionDigits());
Currency tnd = Currency.getInstance("TND");
System.out.println("TND:" + tnd.getDefaultFractionDigits());
} }
static void fromInteger() { static void fromInteger() {